2020-08-29 19:35:41 +00:00
|
|
|
mod slice;
|
|
|
|
pub use slice::{ParallelSlice, ParallelSliceMut};
|
|
|
|
|
|
|
|
mod task;
|
|
|
|
pub use task::Task;
|
|
|
|
|
|
|
|
mod task_pool;
|
|
|
|
pub use task_pool::{Scope, TaskPool, TaskPoolBuilder};
|
|
|
|
|
|
|
|
mod usages;
|
|
|
|
pub use usages::{AsyncComputeTaskPool, ComputeTaskPool, IOTaskPool};
|
|
|
|
|
2020-09-06 05:05:33 +00:00
|
|
|
mod countdown_event;
|
|
|
|
pub use countdown_event::CountdownEvent;
|
|
|
|
|
2020-08-29 19:35:41 +00:00
|
|
|
pub mod prelude {
|
|
|
|
pub use crate::{
|
|
|
|
slice::{ParallelSlice, ParallelSliceMut},
|
|
|
|
usages::{AsyncComputeTaskPool, ComputeTaskPool, IOTaskPool},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn logical_core_count() -> usize {
|
|
|
|
num_cpus::get()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn physical_core_count() -> usize {
|
|
|
|
num_cpus::get_physical()
|
|
|
|
}
|