pub struct WorkStealingPool<T: WorkStealingTask> { /* private fields */ }Expand description
Work-stealing thread pool for adaptive algorithms
Implementations§
Source§impl<T: WorkStealingTask + 'static> WorkStealingPool<T>
impl<T: WorkStealingTask + 'static> WorkStealingPool<T>
Sourcepub fn new(_numthreads: usize) -> Self
pub fn new(_numthreads: usize) -> Self
Create new work-stealing pool with specified number of threads
Sourcepub fn submit_all(&self, tasks: Vec<T>)
pub fn submit_all(&self, tasks: Vec<T>)
Submit multiple tasks for execution
Sourcepub fn execute_and_wait(&self) -> IntegrateResult<()>
pub fn execute_and_wait(&self) -> IntegrateResult<()>
Execute all submitted tasks and wait for completion
Sourcepub fn statistics(&self) -> PoolStatistics
pub fn statistics(&self) -> PoolStatistics
Get current pool statistics
Trait Implementations§
Source§impl<T: WorkStealingTask> Drop for WorkStealingPool<T>
impl<T: WorkStealingTask> Drop for WorkStealingPool<T>
Auto Trait Implementations§
impl<T> Freeze for WorkStealingPool<T>
impl<T> !RefUnwindSafe for WorkStealingPool<T>
impl<T> Send for WorkStealingPool<T>
impl<T> Sync for WorkStealingPool<T>
impl<T> Unpin for WorkStealingPool<T>
impl<T> !UnwindSafe for WorkStealingPool<T>
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