pub trait RawCondvar {
    type RawMutex: RawMutex;

    // Required methods
    fn new() -> Self;
    unsafe fn wait(&self, mutex: &Self::RawMutex);
    unsafe fn wait_timeout(
        &self,
        mutex: &Self::RawMutex,
        duration: Duration
    ) -> bool;
    fn notify_one(&self);
    fn notify_all(&self);
}
Expand description

A raw Condvar trait for no_std environments. Prevents the introduction of dependency on STD for the utils module and its sub-modules. NOTE: Users are strongly advised to just depend on STD and use the STD Condvar in their code.

Required Associated Types§

Required Methods§

source

fn new() -> Self

source

unsafe fn wait(&self, mutex: &Self::RawMutex)

Safety
  • This method should be called only when the mutex is already locked, and by the entity which locked the mutex
source

unsafe fn wait_timeout( &self, mutex: &Self::RawMutex, duration: Duration ) -> bool

Safety
  • This method should be called only when the mutex is already locked, and by the entity which locked the mutex
source

fn notify_one(&self)

source

fn notify_all(&self)

Object Safety§

This trait is not object safe.

Implementors§