diff --git a/src/sys/unix/waker/eventfd.rs b/src/sys/unix/waker/eventfd.rs index c0086fce9..853e679b5 100644 --- a/src/sys/unix/waker/eventfd.rs +++ b/src/sys/unix/waker/eventfd.rs @@ -42,6 +42,13 @@ impl Waker { #[allow(clippy::unused_io_amount)] // Don't care about partial writes. pub(crate) fn wake(&self) -> io::Result<()> { + // The epoll emulation on some illumos systems currently requires + // the eventfd to be read before an edge-triggered read event is + // generated. + // See https://www.illumos.org/issues/16700. + #[cfg(target_os = "illumos")] + self.reset(); + let buf: [u8; 8] = 1u64.to_ne_bytes(); match (&self.fd).write(&buf) { Ok(_) => Ok(()), diff --git a/src/sys/unix/waker/pipe.rs b/src/sys/unix/waker/pipe.rs index a0a3acff6..d01ad2a61 100644 --- a/src/sys/unix/waker/pipe.rs +++ b/src/sys/unix/waker/pipe.rs @@ -40,6 +40,7 @@ impl Waker { // The epoll emulation on some illumos systems currently requires // the pipe buffer to be completely empty for an edge-triggered // wakeup on the pipe read side. + // See https://www.illumos.org/issues/16700. #[cfg(target_os = "illumos")] self.empty();