pub struct ThreadPool { /* private fields */ }
Expand description
§Thread pool for managing background tasks
The thread pool operates on “routines”, which are effectively closures called repeatedly
by the thread pool until they return ControlFlow::Break
.
To submit a task, pass it to ThreadPool::subscribe
and store the received handle.
To cancel a task, pass its handle to ThreadPool::unsubscribe
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThreadPool
impl RefUnwindSafe for ThreadPool
impl !Send for ThreadPool
impl !Sync for ThreadPool
impl Unpin for ThreadPool
impl UnwindSafe for ThreadPool
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