pub struct WorkerState {
pub worker_id: usize,
pub thread_handle: Option<JoinHandle<()>>,
pub task_queue: Arc<Mutex<VecDeque<ParallelTask>>>,
pub status: WorkerStatus,
pub stats: WorkerStatistics,
pub steal_deque: Arc<Mutex<VecDeque<ParallelTask>>>,
}Expand description
Worker thread state
Fields§
§worker_id: usizeWorker ID
thread_handle: Option<JoinHandle<()>>Thread handle
task_queue: Arc<Mutex<VecDeque<ParallelTask>>>Task queue
status: WorkerStatusWorker status
stats: WorkerStatisticsStatistics
steal_deque: Arc<Mutex<VecDeque<ParallelTask>>>Work stealing deque
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkerState
impl !RefUnwindSafe for WorkerState
impl Send for WorkerState
impl Sync for WorkerState
impl Unpin for WorkerState
impl !UnwindSafe for WorkerState
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more