pub struct Event { /* private fields */ }Expand description
An event that is set once and stays set.
wait completes as soon as the event is set, whether
that happened before or after the wait began; set wakes
every waiter. Checking is one atomic load.
use nuclei::sync::Event;
let ready = Event::new();
assert!(!ready.is_set());
ready.set();
assert!(ready.is_set());Implementations§
Trait Implementations§
impl Send for Event
impl Sync for Event
Auto Trait Implementations§
impl !Freeze for Event
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
impl Unpin for Event
impl UnsafeUnpin for Event
Blanket Implementations§
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