logo

Trait bastion::io::prelude::AgnostikExecutor[]

pub trait AgnostikExecutor {
    fn spawn<F>(&self, future: F) -> JoinHandle<<F as Future>::Output>
Notable traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
    R: 'static + Send
type Output = R;

    where
        F: 'static + Future + Send,
        <F as Future>::Output: 'static,
        <F as Future>::Output: Send
;
fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>
Notable traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
    R: 'static + Send
type Output = R;

    where
        F: 'static + FnOnce() -> T + Send,
        T: 'static + Send
;
fn block_on<F>(&self, future: F) -> <F as Future>::Output
    where
        F: 'static + Future + Send,
        <F as Future>::Output: 'static,
        <F as Future>::Output: Send
; }
Expand description

and wait for a future to finish.

Required methods

Spawns an asynchronous task using the underlying executor.

Runs the provided closure on a thread, which can execute blocking tasks asynchronously.

Blocks until the future has finished.

Implementors