pub struct WaiterQueue { /* private fields */ }Implementations§
Source§impl WaiterQueue
impl WaiterQueue
pub fn new() -> Self
pub fn waiter_count(&self) -> usize
Sourcepub unsafe fn wait(&self) -> Waiter<'_>
pub unsafe fn wait(&self) -> Waiter<'_>
§Safety
You must call cancel on the returned waiter before it is dropped.
pub async fn wait_for<T>(&self, condition: impl FnMut() -> Option<T>) -> T
pub async fn wait_until(&self, condition: impl FnMut() -> bool)
pub fn notify(&self, count: usize) -> usize
Sourcepub fn notify_all(&self) -> usize
pub fn notify_all(&self) -> usize
Notify all current waiters. Return the number of waiters notified.
Auto Trait Implementations§
impl !Freeze for WaiterQueue
impl !RefUnwindSafe for WaiterQueue
impl !Send for WaiterQueue
impl !Sync for WaiterQueue
impl Unpin for WaiterQueue
impl !UnwindSafe for WaiterQueue
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