pub struct AsyncRuntime { /* private fields */ }Implementations§
Source§impl AsyncRuntime
impl AsyncRuntime
pub fn new(threads: usize) -> Self
pub fn with_default_threads() -> Self
pub fn with_wake(threads: usize, wake: WakeFn) -> Self
pub fn spawn_future<T, F, A>(&self, future: F, apply: A) -> TaskHandle
pub fn spawn_task<F>(&self, future: F) -> TaskHandle
pub fn spawn_blocking<T, W, A>(&self, work: W, apply: A) -> TaskHandle
pub fn cancel(&self, id: TaskId) -> bool
pub fn spawn_stream<T, F, Make, C>( &self, make_future: Make, on_item: C, ) -> TaskHandle
pub fn spawn_to_signal<T, F>(&self, signal: &Signal<T>, future: F) -> TaskHandle
pub fn pending(&self) -> Signal<u64>
pub fn is_busy(&self) -> bool
pub fn threads(&self) -> usize
pub fn drain(&self) -> usize
pub fn drain_until(&self, timeout: Duration) -> usize
Trait Implementations§
Source§impl Clone for AsyncRuntime
impl Clone for AsyncRuntime
Source§impl TestDrain for AsyncRuntime
impl TestDrain for AsyncRuntime
fn test_drain(&self) -> usize
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncRuntime
impl !Send for AsyncRuntime
impl !Sync for AsyncRuntime
impl !UnwindSafe for AsyncRuntime
impl Freeze for AsyncRuntime
impl Unpin for AsyncRuntime
impl UnsafeUnpin for AsyncRuntime
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