Trait rquickjs_core::ExecutorSpawner
source · [−]pub trait ExecutorSpawner: Sized {
type JoinHandle;
fn spawn_executor(self, task: Executor) -> Self::JoinHandle;
}
Available on crate feature
futures
only.Expand description
The trait to spawn execution of pending jobs on async runtime
Required 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<()>
Available on crate feature
futures
only.sourcefn spawn_executor(self, task: Executor) -> Self::JoinHandle
fn spawn_executor(self, task: Executor) -> Self::JoinHandle
Available on crate feature
futures
only.Implementors
sourceimpl ExecutorSpawner for AsyncStd
Available on crate feature async-std
only.
impl ExecutorSpawner for AsyncStd
Available on crate feature
async-std
only.The async_std
runtime for spawning executors.
type JoinHandle = JoinHandle<()>
sourceimpl ExecutorSpawner for Tokio
Available on crate feature tokio
only.
impl ExecutorSpawner for Tokio
Available on crate feature
tokio
only.The tokio
async runtime for spawning executors.