bevy/crates/bevy_tasks/src/lib.rs
Philip Degarmo 8b3553002d
Reworked parallel executor to not block (#437)
Reworked parallel executor to not block
2020-09-05 22:05:33 -07:00

29 lines
610 B
Rust

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};
mod countdown_event;
pub use countdown_event::CountdownEvent;
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()
}