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 {
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 {}

Loading…
Cancel
Save