summaryrefslogtreecommitdiffstats
path: root/tokio/src/runtime/threadpool/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/runtime/threadpool/mod.rs')
-rw-r--r--tokio/src/runtime/threadpool/mod.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/tokio/src/runtime/threadpool/mod.rs b/tokio/src/runtime/threadpool/mod.rs
index 891b9231..ca4f892a 100644
--- a/tokio/src/runtime/threadpool/mod.rs
+++ b/tokio/src/runtime/threadpool/mod.rs
@@ -173,12 +173,10 @@ impl Runtime {
let trace = &self.inner().trace;
tokio_executor::with_default(&mut self.inner().pool.sender(), || {
- tokio_net::with_default(bg.reactor(), || {
- timer::with_default(bg.timer(), || {
- trace::dispatcher::with_default(trace, || {
- entered.block_on(future)
- })
- })
+ let _reactor = tokio_net::set_default(bg.reactor());
+ let _timer = timer::set_default(bg.timer());
+ trace::dispatcher::with_default(trace, || {
+ entered.block_on(future)
})
})
}