Struct scoped_threadpool::Pool [−][src]
pub struct Pool { /* fields omitted */ }
Expand description
A threadpool that acts as a handle to a number of threads spawned at construction.
Implementations
Construct a threadpool with the given number of threads.
Minimum value is 1
.
Borrows the pool and allows executing jobs on other threads during that scope via the argument of the closure.
This method will block until the closure and all its jobs have run to completion.
Returns the number of threads inside this pool.