Function lair_keystore_api::init_once_rayon_thread_pool[][src]

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

Call this function before any other lair api if you wish to initialize with a custom rayon pool. A default pool will be created if not. Returns true if the lair 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()));