pub struct BasicPool { /* private fields */ }Expand description
Native standard thread pool with persistent workers.
This is the default thread pool when the std feature is enabled without
transient-pool, persistent-pool-rayon, or wasm features.
Note that the thread pool to be used for a parallel computation can be set by the
runner transformation separately for each parallel iterator.
Value of max_num_threads is determined as the minimum of:
- the available parallelism of the host obtained via
std::thread::available_parallelism(), and - the upper bound set by the environment variable “ORX_NUM_THREADS”, when set.
Implementations§
Trait Implementations§
Source§impl ThreadPool for BasicPool
impl ThreadPool for BasicPool
Source§type ScopeRef<'s, 'env, 'scope> = &'s ScopeRef<'env>
where
'scope: 's,
'env: 'scope + 's
type ScopeRef<'s, 'env, 'scope> = &'s ScopeRef<'env> where 'scope: 's, 'env: 'scope + 's
Scope type of the thread pool.
Source§fn max_num_threads(&self) -> NonZeroUsize
fn max_num_threads(&self) -> NonZeroUsize
Returns the maximum number of threads available in the pool. Read more
Source§impl ThreadPool for &BasicPool
impl ThreadPool for &BasicPool
Source§type ScopeRef<'s, 'env, 'scope> = &'s ScopeRef<'env>
where
'scope: 's,
'env: 'scope + 's
type ScopeRef<'s, 'env, 'scope> = &'s ScopeRef<'env> where 'scope: 's, 'env: 'scope + 's
Scope type of the thread pool.
Source§fn max_num_threads(&self) -> NonZeroUsize
fn max_num_threads(&self) -> NonZeroUsize
Returns the maximum number of threads available in the pool. Read more
Source§impl ThreadPool for &mut BasicPool
impl ThreadPool for &mut BasicPool
Source§type ScopeRef<'s, 'env, 'scope> = &'s ScopeRef<'env>
where
'scope: 's,
'env: 'scope + 's
type ScopeRef<'s, 'env, 'scope> = &'s ScopeRef<'env> where 'scope: 's, 'env: 'scope + 's
Scope type of the thread pool.
Source§fn max_num_threads(&self) -> NonZeroUsize
fn max_num_threads(&self) -> NonZeroUsize
Returns the maximum number of threads available in the pool. Read more
Auto Trait Implementations§
impl Freeze for BasicPool
impl RefUnwindSafe for BasicPool
impl Send for BasicPool
impl Sync for BasicPool
impl Unpin for BasicPool
impl UnsafeUnpin for BasicPool
impl UnwindSafe for BasicPool
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