pub struct ThreadPool { /* private fields */ }Expand description
A thread pool that can execute parallel pipelines.
This type doesn’t expose any public methods other than
num_threads(). You can interact with it via
the ThreadPoolBuilder::build() function to create a thread pool, and the
with_thread_pool()
method to attach a thread pool to a parallel iterator.
Implementations§
Source§impl ThreadPool
impl ThreadPool
Sourcepub fn num_threads(&self) -> NonZeroUsize
pub fn num_threads(&self) -> NonZeroUsize
Returns the number of worker threads that have been spawned in this thread pool.
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