pub struct ThreadPool { /* private fields */ }

Implementations§

Construct a threadpool with the given number of threads. Minimum value is 1.

Returns the number of threads inside this pool.

Executes the function job on a thread in the pool.

Returns the number of currently active threads.

Returns the number of created threads

Sets the number of threads to use as threads. Can be used to change the threadpool size during runtime

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.