Skip to main content

set_worker_threads

Function set_worker_threads 

Source
pub fn set_worker_threads(worker_threads: usize)
Expand description

Initialize the count of non-parked scheduler workers before building the process’s Tokio runtime. Tokio’s thread start/stop hooks also include the blocking pool, while park/unpark hooks apply only to scheduler workers.

This assumes a single traced Tokio runtime per process. We do not adjust the count when the runtime shuts down.