aboutsummaryrefslogtreecommitdiff
path: root/src/sys/unix/waker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/unix/waker.rs')
-rw-r--r--src/sys/unix/waker.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sys/unix/waker.rs b/src/sys/unix/waker.rs
index 1305bd6..a7cf484 100644
--- a/src/sys/unix/waker.rs
+++ b/src/sys/unix/waker.rs
@@ -137,6 +137,12 @@ mod pipe {
}
pub fn wake(&self) -> io::Result<()> {
+ // 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.
+ #[cfg(target_os = "illumos")]
+ self.empty();
+
match (&self.sender).write(&[1]) {
Ok(_) => Ok(()),
Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => {