[][src]Function rayon::initialize

pub fn initialize(config: Configuration) -> Result<(), Box<dyn Error + 'static>>

Initializes the global thread pool. This initialization is optional. If you do not call this function, the thread pool will be automatically initialized with the default configuration. In fact, calling initialize is not recommended, except for in two scenarios:

Initialization of the global thread pool happens exactly once. Once started, the configuration cannot be changed. Therefore, if you call initialize a second time, it will return an error. An Ok result indicates that this is the first initialization of the thread pool.