1//! Abstracts out the APIs necessary to `Runtime` for integrating the blocking
2//! pool. When the `blocking` feature flag is **not** enabled, these APIs are
3//! shells. This isolates the complexity of dealing with conditional
4//! compilation.
5
6mod pool;
7pub(crate) use pool::{spawn_blocking, BlockingPool, Spawner};
8
9cfg_fs! {
10 pub(crate) use pool::spawn_mandatory_blocking;
11}
12
13cfg_trace! {
14 pub(crate) use pool::Mandatory;
15}
16
17mod schedule;
18mod shutdown;
19mod task;
20pub(crate) use task::BlockingTask;
21
22use crate::runtime::Builder;
23
24pub(crate) fn create_blocking_pool(builder: &Builder, thread_cap: usize) -> BlockingPool {
25 BlockingPool::new(builder, thread_cap)
26}
27