futures_executor/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Built-in executors and related tools.

#![no_std]
#![deny(missing_docs)]
#![doc(html_root_url = "https://docs.rs/futures-executor/0.2.2")]

#[cfg(feature = "std")]
#[macro_use]
extern crate std;

macro_rules! if_std {
    ($($i:item)*) => ($(
        #[cfg(feature = "std")]
        $i
    )*)
}

if_std! {
    #[macro_use]
    extern crate lazy_static;

    extern crate futures_core;
    extern crate futures_util;
    extern crate futures_channel;
    extern crate num_cpus;

    mod thread;

    mod local_pool;
    pub use local_pool::{block_on, block_on_stream, BlockingStream, LocalPool, LocalExecutor};

    mod unpark_mutex;
    mod thread_pool;
    pub use thread_pool::{ThreadPool, ThreadPoolBuilder};

    mod enter;
    pub use enter::{enter, Enter, EnterError};

    mod spawn;
    pub use spawn::{spawn, Spawn, spawn_with_handle, SpawnWithHandle, JoinHandle};
}