Skip to main content

fdf_env_set_thread_limit

Function fdf_env_set_thread_limit 

Source
pub unsafe extern "C" fn fdf_env_set_thread_limit(
    scheduler_role: *const c_char,
    scheduler_role_len: usize,
    max_threads: u32,
) -> zx_status_t
Expand description

Sets the number of threads which will be spawned for thread pool associated with the given scheduler role. It cannot shrink the limit less to a value lower than the current number of threads in the thread pool.

|scheduler_role| is the name of the role which is passed when creating dispatchers. |scheduler_role_len | is the length of the string, without including the terminating NULL character. |max_threads| is the number of threads to use as new limit.

ยงErrors

ZX_ERR_OUT_OF_RANGE: |max_threads| is less that the current number of threads.