pub struct ScopedThreadPool { /* private fields */ }
Expand description
Scoped thread pool for temporary operations
Implementations§
Source§impl ScopedThreadPool
impl ScopedThreadPool
Sourcepub fn new(_config: ThreadPoolConfig, cleanuptimeout: Duration) -> Self
pub fn new(_config: ThreadPoolConfig, cleanuptimeout: Duration) -> Self
Create a new scoped thread pool
Sourcepub fn should_cleanup(&self) -> bool
pub fn should_cleanup(&self) -> bool
Check if the pool should be cleaned up
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScopedThreadPool
impl RefUnwindSafe for ScopedThreadPool
impl Send for ScopedThreadPool
impl Sync for ScopedThreadPool
impl Unpin for ScopedThreadPool
impl UnwindSafe for ScopedThreadPool
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> 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