Skip to main content

background_thread_enable

Function background_thread_enable 

pub fn background_thread_enable(enable: bool) -> Result<bool, Error>
Expand description

Enables or disables jemalloc’s background purge workers.

Enabling creates workers on demand. Disabling waits for existing workers to terminate before returning. The previous setting is returned. If jemalloc reports a worker-management failure, the requested setting can still have taken effect. A child process starts with workers disabled after fork, regardless of the parent setting. The control exists only on selected pthread-based platforms.

§Errors

Returns an error if jemalloc rejects the read or update.