Trait rquickjs_core::ExecutorSpawner
source · [−]pub trait ExecutorSpawner: Sized {
type JoinHandle;
fn spawn_executor(self, task: Executor) -> Self::JoinHandle;
}
This is supported on crate feature
futures
only.Expand description
The trait to spawn execution of pending jobs on async runtime
Associated Types
type JoinHandle
type JoinHandle
The type of join handle which returns ()
Required methods
fn spawn_executor(self, task: Executor) -> Self::JoinHandle
fn spawn_executor(self, task: Executor) -> Self::JoinHandle
Spawn pending jobs using async runtime spawn function
Implementations on Foreign Types
sourceimpl<'a> ExecutorSpawner for &SmolExecutor<'a>
impl<'a> ExecutorSpawner for &SmolExecutor<'a>
type JoinHandle = Task<()>
type JoinHandle = Task<()>
This is supported on crate feature
futures
only.sourcefn spawn_executor(self, task: Executor) -> Self::JoinHandle
fn spawn_executor(self, task: Executor) -> Self::JoinHandle
This is supported on crate feature
futures
only.Implementors
sourceimpl ExecutorSpawner for AsyncStd
This is supported on crate feature async-std
only.
impl ExecutorSpawner for AsyncStd
This is supported on crate feature
async-std
only.The async_std
runtime for spawning executors.
type JoinHandle = JoinHandle<()>
sourceimpl ExecutorSpawner for Tokio
This is supported on crate feature tokio
only.
impl ExecutorSpawner for Tokio
This is supported on crate feature
tokio
only.The tokio
async runtime for spawning executors.