Macro thread_pool

Source
macro_rules! thread_pool {
    () => { ... };
    ($num_threads:expr) => { ... };
}
Expand description

Utility macro to create thread_pools.

There are two forms of this macro:

let t: rayon::ThreadPool = thread_pool![];
  • Create a ThreadPool with a given number of threads:
let t: rayon::ThreadPool = thread_pool![7];
assert_eq!(t.current_num_threads(), 7);