diff --git a/src/lib.rs b/src/lib.rs index 1a6b750..3d261af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -151,7 +151,7 @@ impl Task { T: Send + 'static, { static EXECUTOR: Lazy = Lazy::new(|| { - for _ in 0..2 { + for _ in 0..num_cpus::get().max(1) { thread::spawn(|| { enter(|| { let (p, u) = async_io::parking::pair();