forked from mirror/async-std
Merge pull request #809 from async-rs/fix/recursive-block-2
fix(rt): use task::block_on on spawned threads
This commit is contained in:
commit
61fc2bae72
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue