pub struct EventFlagSet { /* private fields */ }Expand description
Event flag set: logical flags + wakeup mechanism for state sets.
Separates logical state (AtomicBool per flag) from wakeup delivery (Notify per state set). Setting a flag wakes all state sets.
Implementations§
Source§impl EventFlagSet
impl EventFlagSet
pub fn new( num_flags: usize, sync_map: Vec<Vec<usize>>, ss_wakeups: Vec<Arc<Notify>>, ) -> Self
Sourcepub fn test_and_clear(&self, ef_id: usize) -> bool
pub fn test_and_clear(&self, ef_id: usize) -> bool
Test and clear atomically. Returns the previous value.
Sourcepub fn synced_channels(&self, ef_id: usize) -> &[usize]
pub fn synced_channels(&self, ef_id: usize) -> &[usize]
Get the channel ids synced to a given event flag.
pub fn num_flags(&self) -> usize
Auto Trait Implementations§
impl Freeze for EventFlagSet
impl RefUnwindSafe for EventFlagSet
impl Send for EventFlagSet
impl Sync for EventFlagSet
impl Unpin for EventFlagSet
impl UnsafeUnpin for EventFlagSet
impl UnwindSafe for EventFlagSet
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