pub struct ManagedPool { /* private fields */ }Expand description
A fixed-size Rayon pool owned by a daemon for CPU-bound archive work.
Implementations§
Source§impl ManagedPool
impl ManagedPool
Sourcepub fn new(name: impl Into<String>, thread_count: usize) -> Result<Self>
pub fn new(name: impl Into<String>, thread_count: usize) -> Result<Self>
Create a named pool with a fixed number of worker threads.
A thread count of zero uses the host’s available parallelism.
§Errors
Returns an error when Rayon cannot create the pool.
Sourcepub fn install<F, R>(&self, operation: F) -> R
pub fn install<F, R>(&self, operation: F) -> R
Run a synchronous operation on this pool and return its result.
Sourcepub fn spawn_fifo<F>(&self, operation: F)
pub fn spawn_fifo<F>(&self, operation: F)
Queue a task in FIFO order on this pool.
Sourcepub const fn thread_count(&self) -> usize
pub const fn thread_count(&self) -> usize
Return the fixed number of worker threads in this pool.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ManagedPool
impl !UnwindSafe for ManagedPool
impl Freeze for ManagedPool
impl Send for ManagedPool
impl Sync for ManagedPool
impl Unpin for ManagedPool
impl UnsafeUnpin for ManagedPool
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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