[][src]Function bastion::executor::spawn

pub fn spawn<F, T>(future: F) -> RecoverableHandle<T> where
    F: Future<Output = T> + Send + 'static,
    T: Send + 'static, 

Spawn a given future onto the executor from the global level.

Example

use bastion::executor::{spawn, run};
let handle = spawn(async {
    panic!("test");
});
run(handle);