pub fn parallel_distribute<P: FnMut(i32, i32)>(max_n: i32, func: P)
Distributes the execution of a function across multiple threads, by calling it with a different index on each thread.
max_n
the maximal number of threads to use
func
the function to call