pub fn num_threads(&mut self, num: usize) -> Result<(), BuildError> {
        match rayon::ThreadPoolBuilder::new().num_threads(num).build() {
            Ok(pool) => {
                self.thread_pool = Some(pool);
                Ok(())
            }
            Err(error) => Err(BuildError::NumThreads(error.description().to_string())),
        }
    }
/// Immediately after calling this method,
/// the dispatcher will attempt to build a thread-pool with
/// `num` amount of threads.
/// If internals fail to build, [`BuildError`] is returned.
///
/// **Note**: Failing to build the thread-pool will result
/// in keeping the prior thread-pool, if one has been built before.
/// If none has been built, none will be used; being default.
///
/// [`BuildError`]: enum.BuildError.html
Immediately after calling this method,
the dispatcher will attempt to build a thread-pool with
`num` amount of threads.
If internals fail to build, [`BuildError`] is returned.

Note**: Failing to build the thread-pool will result
in keeping the prior thread-pool, if one has been built before.
If none has been built, none will be used; being default.


Immediately after calling this method the dispatcher will attempt to build a thread - pool with ` num ` amount of threads . If internals fail to build [ ` BuildError ` ] is returned . Note ** : Failing to build the thread - pool will result in keeping the prior thread - pool if one has been built before . If none has been built none will be used ; being default .
pub fn num_threads(&mut self, num: usize) -> Result<(), BuildError> {
        match rayon::ThreadPoolBuilder::new().num_threads(num).build() {
            Ok(pool) => {
                self.thread_pool = Some(pool);
                Ok(())
            }
            Err(error) => Err(BuildError::NumThreads(error.description().to_string())),
        }
    }
pub fn num_threads ( & mut self , num : usize ) -> Result < ( ) , BuildError > { match rayon :: ThreadPoolBuilder :: new ( ) . num_threads ( num ) . build ( ) { Ok ( pool ) => { self . thread_pool = Some ( pool ) ; Ok ( ( ) ) } Err ( error ) => Err ( BuildError :: NumThreads ( error . description ( ) . to_string ( ) ) ) , } }
Immediately after calling this method,
the dispatcher will attempt to build a thread-pool with
`num` amount of threads.
Immediately after calling this method the dispatcher will attempt to build a thread - pool with ` num ` amount of threads .
&mut self
num
usize
&mut self
num
usize