From 5a1a681d685763011c258edb8b6e2a3e22bc418e Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Thu, 4 Jun 2020 18:25:07 +0200 Subject: [PATCH] fix(rt): use task::block_on on spawned threads This makes sure to capture threads into the recursive block_on detection. --- src/rt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rt/mod.rs b/src/rt/mod.rs index 65f4e248..d8550aac 100644 --- a/src/rt/mod.rs +++ b/src/rt/mod.rs @@ -27,7 +27,7 @@ pub static RUNTIME: Lazy = Lazy::new(|| { for _ in 0..thread_count { thread::Builder::new() .name(thread_name.clone()) - .spawn(|| smol::run(future::pending::<()>())) + .spawn(|| crate::task::block_on(future::pending::<()>())) .expect("cannot start a runtime thread"); } Runtime {}