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:
Yoshua Wuyts 2020-06-07 10:37:28 +02:00 committed by GitHub
commit 61fc2bae72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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