pub struct BlockingSpawner { /* private fields */ }Expand description
Executes blocking closures on the current thread (via tokio::task::block_in_place)
with bounded concurrency from a semaphore.
On a CurrentThread runtime, block_in_place panics, so the spawner falls
back to calling the closure directly.
Implementations§
Trait Implementations§
Source§impl Clone for BlockingSpawner
impl Clone for BlockingSpawner
Source§fn clone(&self) -> BlockingSpawner
fn clone(&self) -> BlockingSpawner
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 BlockingSpawner
impl !RefUnwindSafe for BlockingSpawner
impl Send for BlockingSpawner
impl Sync for BlockingSpawner
impl Unpin for BlockingSpawner
impl UnsafeUnpin for BlockingSpawner
impl !UnwindSafe for BlockingSpawner
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