pub struct RawCondvar { /* private fields */ }Expand description
A raw condition variable.
Waits never return spuriously. notify_one
returns exactly whether a waiting thread was selected for notification, and
notify_all returns the exact number of
waiting threads selected. A thread requeued directly onto the associated
mutex is considered notified.
Trait Implementations§
Source§impl RawCondvar for RawCondvar
impl RawCondvar for RawCondvar
Source§unsafe fn wait(&self, mutex: &RawMutex, _guard: &mut GuardNoSend)
unsafe fn wait(&self, mutex: &RawMutex, _guard: &mut GuardNoSend)
Atomically unlocks the mutex and waits, then re-locks the mutex before
returning. Read more
Source§fn notify_one(&self) -> bool
fn notify_one(&self) -> bool
Notifies one waiting thread. Read more
Source§fn notify_all(&self) -> usize
fn notify_all(&self) -> usize
Notifies all waiting threads. Read more
Source§impl RawCondvarTimed for RawCondvar
impl RawCondvarTimed for RawCondvar
Source§fn checked_duration_to_instant(timeout: &Duration) -> Option<Instant>
fn checked_duration_to_instant(timeout: &Duration) -> Option<Instant>
Converts a relative timeout into an absolute timeout. Read more
Source§unsafe fn wait_for(
&self,
mutex: &RawMutex,
_guard: &mut GuardNoSend,
timeout: &Duration,
) -> bool
unsafe fn wait_for( &self, mutex: &RawMutex, _guard: &mut GuardNoSend, timeout: &Duration, ) -> bool
Atomically unlocks the mutex and waits for a notification, a spurious
wakeup, or the timeout to be reached, then re-locks the mutex before
returning. Read more
Source§unsafe fn wait_until(
&self,
mutex: &RawMutex,
_guard: &mut GuardNoSend,
timeout: &Instant,
) -> bool
unsafe fn wait_until( &self, mutex: &RawMutex, _guard: &mut GuardNoSend, timeout: &Instant, ) -> bool
Atomically unlocks the mutex and waits for a notification, a spurious
wakeup, or the timeout to be reached, then re-locks the mutex before
returning. Read more
Auto Trait Implementations§
impl !Freeze for RawCondvar
impl RefUnwindSafe for RawCondvar
impl Send for RawCondvar
impl Sync for RawCondvar
impl Unpin for RawCondvar
impl UnsafeUnpin for RawCondvar
impl UnwindSafe for RawCondvar
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