Skip to main content

default_threads

Function default_threads 

Source
pub fn default_threads() -> usize
Expand description

The worker cap for max_threads: 0: 32 per CPU, at least 512 and at most 1024. Sized for blocking integration calls like a thread-per-request server’s pool (a 100 ms handler needs about 10 threads per 100 requests per second; Cameleer’s pool is 1024); workers start on demand and exit after idle_timeout, so the cap costs nothing until jobs block (K10).