Function sodoken::init_once_rayon_thread_pool[][src]

pub fn init_once_rayon_thread_pool<F>(f: F) -> bool where
    F: FnOnce() -> Arc<ThreadPool>, 

Call this function before any other sodoken api if you wish to initialize with a custom rayon pool. A default pool will be created if not. Returns true if the sodoken rayon pool was previously uninitialized and now holds the pool that was passed in to this function.

Example

init_once_rayon_thread_pool(|| Arc::new(rayon::ThreadPoolBuilder::new().build().unwrap()));