pub struct BlockingPoolHandle { /* private fields */ }Expand description
A handle to the blocking pool that can be cloned and shared.
Implementations§
Source§impl BlockingPoolHandle
impl BlockingPoolHandle
Sourcepub fn spawn<F>(&self, f: F) -> BlockingTaskHandle
pub fn spawn<F>(&self, f: F) -> BlockingTaskHandle
Spawns a blocking task.
Sourcepub fn spawn_with_priority<F>(&self, f: F, priority: u8) -> BlockingTaskHandle
pub fn spawn_with_priority<F>(&self, f: F, priority: u8) -> BlockingTaskHandle
Spawns a blocking task with a priority.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Returns the number of pending tasks.
Sourcepub fn active_threads(&self) -> usize
pub fn active_threads(&self) -> usize
Returns the number of active threads.
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Returns true if the pool is shut down.
Trait Implementations§
Source§impl Clone for BlockingPoolHandle
impl Clone for BlockingPoolHandle
Source§fn clone(&self) -> BlockingPoolHandle
fn clone(&self) -> BlockingPoolHandle
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 moreAuto Trait Implementations§
impl Freeze for BlockingPoolHandle
impl !RefUnwindSafe for BlockingPoolHandle
impl Send for BlockingPoolHandle
impl Sync for BlockingPoolHandle
impl Unpin for BlockingPoolHandle
impl !UnwindSafe for BlockingPoolHandle
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).