pub struct WakePipe { /* private fields */ }Expand description
Cross-platform wake notification built on pipe().
The write end signals, the read end is pollable via epoll/kqueue/poll.
Implementations§
Source§impl WakePipe
impl WakePipe
Sourcepub fn new() -> WakePipe
pub fn new() -> WakePipe
Create a new wake pipe.
Both ends are set to non-blocking and close-on-exec.
Sourcepub fn wake(&self)
pub fn wake(&self)
Signal the reader. Safe to call from any thread, multiple times.
Writes a single byte. If the pipe buffer is full the write is silently dropped — the reader will still wake because there are unread bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WakePipe
impl RefUnwindSafe for WakePipe
impl Send for WakePipe
impl Sync for WakePipe
impl Unpin for WakePipe
impl UnsafeUnpin for WakePipe
impl UnwindSafe for WakePipe
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more