Struct ckb_async_runtime::Handle [−][src]
pub struct Handle { /* fields omitted */ }
Expand description
Handle to the runtime.
Implementations
Enter the runtime context. This allows you to construct types that must
have an executor available on creation such as tokio::time::Sleep
or tokio::net::TcpStream
.
It will also allow you to call methods such as tokio::spawn
.
Spawns a future onto the runtime.
This spawns the given future onto the runtime’s executor
Run a future to completion on the Tokio runtime from a synchronous context.
pub fn spawn_blocking<F, R>(&self, f: F) -> JoinHandle<R> where
F: FnOnce() -> R + Send + 'static,
R: Send + 'static,
pub fn spawn_blocking<F, R>(&self, f: F) -> JoinHandle<R> where
F: FnOnce() -> R + Send + 'static,
R: Send + 'static,
Spawns a future onto the runtime blocking pool.
This spawns the given future onto the runtime’s blocking executor
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Handle
impl !UnwindSafe for Handle
Blanket Implementations
Mutably borrows from an owned value. Read more