Struct wait_condition::SatisfiedWaitCondition
source · pub struct SatisfiedWaitCondition<'wc, F: WaitConditionFn> { /* private fields */ }
Expand description
A type wrapper that guarantees a given condition has been met
before allowing one task to notify (wake up) other Task
s waiting on a WaitCondition
.
See the condition_satisfied()
method.
Implementations§
source§impl<'wc, F: WaitConditionFn> SatisfiedWaitCondition<'wc, F>
impl<'wc, F: WaitConditionFn> SatisfiedWaitCondition<'wc, F>
sourcepub fn notify_one(&self) -> bool
pub fn notify_one(&self) -> bool
Wake up a random Task
that is waiting on this condition.
Return
- returns
Ok(true)
if aTask
was successfully woken up, - returns
Ok(false)
if there were noTask
s waiting.
Auto Trait Implementations§
impl<'wc, F> !RefUnwindSafe for SatisfiedWaitCondition<'wc, F>
impl<'wc, F> Send for SatisfiedWaitCondition<'wc, F>where F: Sync,
impl<'wc, F> Sync for SatisfiedWaitCondition<'wc, F>where F: Sync,
impl<'wc, F> Unpin for SatisfiedWaitCondition<'wc, F>
impl<'wc, F> !UnwindSafe for SatisfiedWaitCondition<'wc, F>
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