orx_parallel/runner/
mod.rs

1mod computation_kind;
2mod implementations;
3mod num_spawned;
4mod parallel_runner;
5
6pub(crate) use parallel_runner::{SharedStateOf, ThreadRunnerOf};
7
8pub use computation_kind::ComputationKind;
9pub use implementations::{RunnerWithPool, SequentialPool};
10pub use num_spawned::NumSpawned;
11pub use parallel_runner::ParallelRunner;
12
13#[cfg(feature = "pond")]
14pub use implementations::PondPool;
15
16#[cfg(feature = "std")]
17pub use implementations::StdDefaultPool;
18
19#[cfg(feature = "yastl")]
20pub use implementations::YastlPool;
21
22// DEFAULT
23
24/// Default pool used by orx-parallel computations:
25///
26/// * [`StdDefaultPool`] when "std" feature is enabled,
27/// * [`SequentialPool`] otherwise.
28#[cfg(feature = "std")]
29pub type DefaultPool = StdDefaultPool;
30/// Default pool used by orx-parallel computations:
31///
32/// * `StdDefaultPool` when "std" feature is enabled,
33/// * [`SequentialPool`] otherwise.
34#[cfg(not(feature = "std"))]
35pub type DefaultPool = SequentialPool;
36
37/// Default runner used by orx-parallel computations, using the [`DefaultPool`]:
38///
39/// * [`RunnerWithPool`] with [`StdDefaultPool`] when "std" feature is enabled,
40/// * [`RunnerWithPool`] with [`SequentialPool`] otherwise.
41pub type DefaultRunner = RunnerWithPool<DefaultPool>;