pub struct CondVar { /* private fields */ }Expand description
A Condition Variable that is compatible with both standard Mutex and LockDepMutex in Starnix.
Implementations§
Source§impl CondVar
impl CondVar
pub const fn new() -> Self
Sourcepub fn wait<'a, T: 'a, G: WaitableMutexGuard<'a, T>>(&self, guard: &mut G)
pub fn wait<'a, T: 'a, G: WaitableMutexGuard<'a, T>>(&self, guard: &mut G)
Blocks the current thread until this condition variable receives a notification.
Sourcepub fn notify_one(&self)
pub fn notify_one(&self)
Wakes up one blocked thread on this condvar.
Sourcepub fn notify_all(&self)
pub fn notify_all(&self)
Wakes up all blocked threads on this condvar.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CondVar
impl RefUnwindSafe for CondVar
impl Send for CondVar
impl Sync for CondVar
impl Unpin for CondVar
impl UnsafeUnpin for CondVar
impl UnwindSafe for CondVar
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