pub struct ThreadPool { /* private fields */ }
Expand description
A basic thread pool implementation.
Implementations§
Source§impl ThreadPool
impl ThreadPool
Sourcepub fn with_threads(nthreads: usize) -> ThreadPool
pub fn with_threads(nthreads: usize) -> ThreadPool
Makes a new ThreadPool with nthreads
threads.
Trait Implementations§
Source§impl Default for ThreadPool
impl Default for ThreadPool
Source§fn default() -> ThreadPool
fn default() -> ThreadPool
Creates a new ThreadPool with the number of physical+logical threads the computer has.
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