Skip to main content

max_threads

Function max_threads 

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

Returns the soft and hard per-user process-count limits.

The tuple is ordered as the current soft limit followed by the maximum hard limit. Values come from RLIMIT_NPROC; on Linux, it counts extant threads for the caller’s real user ID.

§Panics

Panics when either platform limit cannot be represented as usize.