fix(rt): use task::block_on on spawned threads

This makes sure to capture threads into the recursive block_on detection.
master
dignifiedquire 5 years ago
parent e12cf80ab0
commit 5a1a681d68

@ -27,7 +27,7 @@ pub static RUNTIME: Lazy<Runtime> = Lazy::new(|| {
for _ in 0..thread_count { for _ in 0..thread_count {
thread::Builder::new() thread::Builder::new()
.name(thread_name.clone()) .name(thread_name.clone())
.spawn(|| smol::run(future::pending::<()>())) .spawn(|| crate::task::block_on(future::pending::<()>()))
.expect("cannot start a runtime thread"); .expect("cannot start a runtime thread");
} }
Runtime {} Runtime {}

Loading…
Cancel
Save