pub struct ParallelContext { /* private fields */ }Expand description
Parallel execution context for CPU-bound work
Work runs on the process-wide scheduler rather than a context-owned pool, so several contexts share one worker set instead of over-subscribing the machine with a thread pool each.
Implementations§
Source§impl ParallelContext
impl ParallelContext
Sourcepub fn new() -> ParallelContext
pub fn new() -> ParallelContext
Create a new parallel context with the default chunk size
Sourcepub fn with_chunk_size(chunk_size: usize) -> ParallelContext
pub fn with_chunk_size(chunk_size: usize) -> ParallelContext
Create with specific chunk size
Trait Implementations§
Source§impl Clone for ParallelContext
impl Clone for ParallelContext
Source§fn clone(&self) -> ParallelContext
fn clone(&self) -> ParallelContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParallelContext
impl Debug for ParallelContext
Source§impl Default for ParallelContext
impl Default for ParallelContext
Source§fn default() -> ParallelContext
fn default() -> ParallelContext
Returns the “default value” for a type. Read more
Source§impl ExecutionBase for ParallelContext
impl ExecutionBase for ParallelContext
Auto Trait Implementations§
impl Freeze for ParallelContext
impl RefUnwindSafe for ParallelContext
impl Send for ParallelContext
impl Sync for ParallelContext
impl Unpin for ParallelContext
impl UnsafeUnpin for ParallelContext
impl UnwindSafe for ParallelContext
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