Skip to main content

get_async_runtime_parallelism

Function get_async_runtime_parallelism 

Source
pub fn get_async_runtime_parallelism() -> Result<usize, GenericError>
Expand description

Determines the parallelism – the number of worker threads – to use for the primary async runtime.

If SALUKI_WORKER_THREADS is set, its value is used as-is. Otherwise, the available parallelism of the system is used, or a minimum of two worker threads, whichever is greater.

§Errors

If SALUKI_WORKER_THREADS is set but isn’t a positive integer, an error is returned.