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 Clone for SequentialPool
impl Clone for SequentialPool
Source§fn clone(&self) -> SequentialPool
fn clone(&self) -> SequentialPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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§type ScopeRef<'s, 'env, 'scope> = ()
where
'scope: 's,
'env: 'scope + 's
type ScopeRef<'s, 'env, 'scope> = () where 'scope: 's, 'env: 'scope + 's
Scope type of the thread pool.
Source§fn run_in_scope<'s, 'env, 'scope, W>(
_: &Self::ScopeRef<'s, 'env, 'scope>,
work: W,
)
fn run_in_scope<'s, 'env, 'scope, W>( _: &Self::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) -> NonZeroUsize
fn max_num_threads(&self) -> NonZeroUsize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more