diff --git a/tokio/src/runtime/io/driver.rs b/tokio/src/runtime/io/driver.rs index 5b97a8802de..609d7385f0c 100644 --- a/tokio/src/runtime/io/driver.rs +++ b/tokio/src/runtime/io/driver.rs @@ -41,7 +41,7 @@ pub(crate) struct Handle { /// Used to wake up the reactor from a call to `turn`. /// Not supported on `Wasi` due to lack of threading support. - #[cfg(not(target_os = "wasi"))] + #[cfg(not(all(target_os = "wasi", not(tokio_unstable))))] waker: mio::Waker, pub(crate) metrics: IoDriverMetrics, @@ -93,7 +93,7 @@ impl Driver { /// creation. pub(crate) fn new(nevents: usize) -> io::Result<(Driver, Handle)> { let poll = mio::Poll::new()?; - #[cfg(not(target_os = "wasi"))] + #[cfg(not(all(target_os = "wasi", not(tokio_unstable))))] let waker = mio::Waker::new(poll.registry(), TOKEN_WAKEUP)?; let registry = poll.registry().try_clone()?; @@ -109,7 +109,7 @@ impl Driver { registry, registrations, synced: Mutex::new(synced), - #[cfg(not(target_os = "wasi"))] + #[cfg(not(all(target_os = "wasi", not(tokio_unstable))))] waker, metrics: IoDriverMetrics::default(), }; @@ -204,7 +204,7 @@ impl Handle { /// blocked in `turn`, then the next call to `turn` will not block and /// return immediately. pub(crate) fn unpark(&self) { - #[cfg(not(target_os = "wasi"))] + #[cfg(not(all(target_os = "wasi", not(tokio_unstable))))] self.waker.wake().expect("failed to wake I/O driver"); }