pub struct Condvar { /* private fields */ }Implementations§
source§impl Condvar
impl Condvar
pub const fn init(cond: &'static Condvar) -> Condvar
sourcepub fn notify_one(&self)
pub fn notify_one(&self)
Alias for Condvar::signal to match std::sync::Condvar.
sourcepub fn notify_all(&self)
pub fn notify_all(&self)
Alias for Condvar::broadcast to match std::sync::Condvar.
sourcepub fn wait<T>(&self, guard: &MutexGuard<'_, T>)
pub fn wait<T>(&self, guard: &MutexGuard<'_, T>)
Unlock the mutex until the Condvar has been signaled, and re-acquire the mutex afterward.
sourcepub fn wait_while<T, F>(&self, guard: &MutexGuard<'_, T>, condition: F)
pub fn wait_while<T, F>(&self, guard: &MutexGuard<'_, T>, condition: F)
Repeatedly wait on the Condvar while condition returns true.
sourcepub fn wait_while_mut<T, F>(&self, guard: &mut MutexGuard<'_, T>, condition: F)
pub fn wait_while_mut<T, F>(&self, guard: &mut MutexGuard<'_, T>, condition: F)
wait_while but allow mutation of the guard and other state from the condition function.
pub fn timed_wait<'a, T>( &self, guard: MutexGuard<'a, T>, ticks: Utick ) -> Option<MutexGuard<'a, T>>
Trait Implementations§
impl RefUnwindSafe for Condvar
impl Send for Condvar
impl Sync for Condvar
impl UnwindSafe for Condvar
Auto Trait Implementations§
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