pub struct SequentialPool;Expand description
A ‘thread pool’ with max_num_threads of 1.
All computations using this thread pool are executed sequentially by the main thread.
This is the default thread pool used when “std” feature is disabled.
Note that the thread pool to be used for a parallel computation can be set by the
with_runner transformation separately for each parallel iterator.
Trait Implementations§
Source§impl Default for SequentialPool
impl Default for SequentialPool
Source§fn default() -> SequentialPool
fn default() -> SequentialPool
Returns the “default value” for a type. Read more
Source§impl ParThreadPool for SequentialPool
impl ParThreadPool for SequentialPool
Source§fn run_in_scope<'s, 'env, 'scope, W>(
_: &<SequentialPool as ParThreadPool>::ScopeRef<'s, 'env, 'scope>,
work: W,
)
fn run_in_scope<'s, 'env, 'scope, W>( _: &<SequentialPool as ParThreadPool>::ScopeRef<'s, 'env, 'scope>, work: W, )
Executes the
work within scope s.Source§fn scoped_computation<'env, 'scope, F>(&'env mut self, f: F)
fn scoped_computation<'env, 'scope, F>(&'env mut self, f: F)
Executes the scoped computation
f.Source§fn max_num_threads(&self) -> NonZero<usize>
fn max_num_threads(&self) -> NonZero<usize>
Returns the maximum number of threads available in the pool.
Auto Trait Implementations§
impl Freeze for SequentialPool
impl RefUnwindSafe for SequentialPool
impl Send for SequentialPool
impl Sync for SequentialPool
impl Unpin for SequentialPool
impl UnwindSafe for SequentialPool
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