Trait ThreadCoordinator
pub trait ThreadCoordinator: Send + Sync {
// Required methods
fn create_barrier(
&self,
count: usize,
) -> Result<Box<dyn ThreadBarrier>, NerveError>;
fn create_condition(&self) -> Result<Box<dyn ThreadCondition>, NerveError>;
fn coordinate_startup(&self) -> Result<(), NerveError>;
fn coordinate_shutdown(&self) -> Result<(), NerveError>;
fn status(&self) -> CoordinationStatus;
}Expand description
Thread coordinator interface
Required Methods§
fn create_barrier(
&self,
count: usize,
) -> Result<Box<dyn ThreadBarrier>, NerveError>
fn create_barrier( &self, count: usize, ) -> Result<Box<dyn ThreadBarrier>, NerveError>
Create a thread barrier
fn create_condition(&self) -> Result<Box<dyn ThreadCondition>, NerveError>
fn create_condition(&self) -> Result<Box<dyn ThreadCondition>, NerveError>
Create a thread condition variable
fn coordinate_startup(&self) -> Result<(), NerveError>
fn coordinate_startup(&self) -> Result<(), NerveError>
Coordinate thread startup
fn coordinate_shutdown(&self) -> Result<(), NerveError>
fn coordinate_shutdown(&self) -> Result<(), NerveError>
Coordinate thread shutdown
fn status(&self) -> CoordinationStatus
fn status(&self) -> CoordinationStatus
Get coordination status