bevy_tasks

Function available_parallelism

Source
pub fn available_parallelism() -> usize
Expand description

Gets the logical CPU core count available to the current process.

This is identical to std::thread::available_parallelism, except it will return a default value of 1 if it internally errors out.

This will always return at least 1.