diff --git a/tokio/src/park/thread.rs b/tokio/src/park/thread.rs index 7b35ba38e28..4db1c1b31b6 100644 --- a/tokio/src/park/thread.rs +++ b/tokio/src/park/thread.rs @@ -64,10 +64,10 @@ impl Park for ParkThread { } fn park_timeout(&mut self, duration: Duration) -> Result<(), Self::Error> { - // Wasi doesn't have threads, so just sleep. - #[cfg(not(tokio_wasi))] + // Wasm doesn't have threads, so just sleep. + #[cfg(not(tokio_wasm))] self.inner.park_timeout(duration); - #[cfg(tokio_wasi)] + #[cfg(tokio_wasm)] std::thread::sleep(duration); Ok(()) }