Merge pull request #809 from async-rs/fix/recursive-block-2

fix(rt): use task::block_on on spawned threads
master
Yoshua Wuyts 5 years ago committed by GitHub
commit 61fc2bae72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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