Trait ThreadCondition
pub trait ThreadCondition: Send + Sync {
// Required methods
fn wait(&self) -> Result<(), NerveError>;
fn wait_timeout(&self, timeout: Duration) -> Result<bool, NerveError>;
fn signal(&self) -> Result<(), NerveError>;
fn broadcast(&self) -> Result<(), NerveError>;
}Expand description
Thread condition variable interface
Required Methods§
fn wait(&self) -> Result<(), NerveError>
fn wait(&self) -> Result<(), NerveError>
Wait for condition to be signaled
fn wait_timeout(&self, timeout: Duration) -> Result<bool, NerveError>
fn wait_timeout(&self, timeout: Duration) -> Result<bool, NerveError>
Wait for condition with timeout
fn signal(&self) -> Result<(), NerveError>
fn signal(&self) -> Result<(), NerveError>
Signal one waiting thread
fn broadcast(&self) -> Result<(), NerveError>
fn broadcast(&self) -> Result<(), NerveError>
Signal all waiting threads