pub struct BlockingExecutor { /* private fields */ }Implementations§
Source§impl BlockingExecutor
impl BlockingExecutor
pub fn worker_count(&self) -> usize
pub fn reserved_bytes(&self) -> usize
Sourcepub fn scoped(
&self,
resources: Arc<ResourceLedger>,
admission_open: Arc<AtomicBool>,
admission_gate: Arc<Mutex<()>>,
) -> Self
pub fn scoped( &self, resources: Arc<ResourceLedger>, admission_open: Arc<AtomicBool>, admission_gate: Arc<Mutex<()>>, ) -> Self
Share the fixed workers and queue while charging admission to a child ledger (which atomically charges its process parent too).
pub fn submit<F>( &self, reserved_bytes: usize, operation: F, ) -> Result<(), BlockingJobError>
pub async fn run<T, F>( &self, reserved_bytes: usize, operation: F, ) -> Result<T, BlockingJobError>
pub fn run_sync<T, F>( &self, reserved_bytes: usize, timeout: Duration, operation: F, ) -> Result<T, BlockingJobError>
Trait Implementations§
Source§impl Clone for BlockingExecutor
impl Clone for BlockingExecutor
Source§fn clone(&self) -> BlockingExecutor
fn clone(&self) -> BlockingExecutor
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 moreAuto Trait Implementations§
impl Freeze for BlockingExecutor
impl RefUnwindSafe for BlockingExecutor
impl Send for BlockingExecutor
impl Sync for BlockingExecutor
impl Unpin for BlockingExecutor
impl UnsafeUnpin for BlockingExecutor
impl UnwindSafe for BlockingExecutor
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