summaryrefslogtreecommitdiffstats
path: root/tokio/src/executor/thread_pool/pool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/executor/thread_pool/pool.rs')
-rw-r--r--tokio/src/executor/thread_pool/pool.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tokio/src/executor/thread_pool/pool.rs b/tokio/src/executor/thread_pool/pool.rs
index 1da4239b..6a83e97d 100644
--- a/tokio/src/executor/thread_pool/pool.rs
+++ b/tokio/src/executor/thread_pool/pool.rs
@@ -68,8 +68,11 @@ impl ThreadPool {
F: Future,
{
crate::executor::global::with_threadpool(self, || {
- let mut enter = crate::executor::enter().expect("attempting to block while on a Tokio executor");
- crate::executor::blocking::with_pool(self.spawner.blocking_pool(), || enter.block_on(future))
+ let mut enter =
+ crate::executor::enter().expect("attempting to block while on a Tokio executor");
+ crate::executor::blocking::with_pool(self.spawner.blocking_pool(), || {
+ enter.block_on(future)
+ })
})
}