[go: up one dir, main page]

tokio-executor 0.1.1

Future execution primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
extern crate tokio_executor;
extern crate futures;

use tokio_executor::*;
use futures::future::lazy;

#[test]
fn spawn_out_of_executor_context() {
    let res = DefaultExecutor::current().spawn(Box::new(lazy(|| Ok(()))));
    assert!(res.is_err());
}