pub struct ThreadPool { /* private fields */ }
Expand description
Safe thread pool for managing multiple threads
Implementations§
Source§impl ThreadPool
impl ThreadPool
Sourcepub fn execute<F>(&mut self, _task: F) -> ThreadResult<()>
pub fn execute<F>(&mut self, _task: F) -> ThreadResult<()>
Execute a task in the thread pool
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Get the number of active threads
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