pub struct WakerSet(/* private fields */);Expand description
A set of wakers that can be woken all at once.
This is useful for implementing synchronization primitives that need to wake up multiple tasks.
Implementations§
Source§impl WakerSet
impl WakerSet
Sourcepub fn add_by_ref(&self, waker: &Waker)
pub fn add_by_ref(&self, waker: &Waker)
Adds a waker to the set by reference.
Sourcepub fn wake_all(&self) -> usize
pub fn wake_all(&self) -> usize
Wakes all wakers in the set.
Returns the number of wakers that were woken.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WakerSet
impl RefUnwindSafe for WakerSet
impl Send for WakerSet
impl Sync for WakerSet
impl Unpin for WakerSet
impl UnwindSafe for WakerSet
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