pub fn new(core_size: usize, max_size: usize, keep_alive: Duration) -> Self {
        static POOL_COUNTER: AtomicUsize = AtomicUsize::new(1);
        let name = format!(
            "rusty_pool_{}",
            POOL_COUNTER.fetch_add(1, Ordering::Relaxed)
        );
        ThreadPool::new_named(name, core_size, max_size, keep_alive)
    }
/// Construct a new `ThreadPool` with the specified core pool size, max pool size
/// and keep_alive time for non-core threads. This function does not spawn any
/// threads. This `ThreadPool` will receive a default name in the following format:
/// "rusty_pool_" + pool number.
///
/// `core_size` specifies the amount of threads to keep alive for as long as
/// the `ThreadPool` exists and its channel remains connected.
///
/// `max_size` specifies the maximum number of worker threads that may exist
/// at the same time.
///
/// `keep_alive` specifies the duration for which to keep non-core pool
/// worker threads alive while they do not receive any work.
///
/// # Panics
///
/// This function will panic if max_size is 0, lower than core_size or exceeds half
/// the size of usize. This restriction exists because two counters (total workers and
/// idle counters) are stored within one AtomicUsize.
Construct a new `ThreadPool` with the specified core pool size, max pool size
and keep_alive time for non-core threads. This function does not spawn any
threads. This `ThreadPool` will receive a default name in the following format:
"rusty_pool_" + pool number.

`core_size` specifies the amount of threads to keep alive for as long as
the `ThreadPool` exists and its channel remains connected.

`max_size` specifies the maximum number of worker threads that may exist
at the same time.

`keep_alive` specifies the duration for which to keep non-core pool
worker threads alive while they do not receive any work.
Construct a new ` ThreadPool ` with the specified core pool size max pool size and keep_alive time for non - core threads . This function does not spawn any threads . This ` ThreadPool ` will receive a default name in the following format : " rusty_pool_ " + pool number . ` core_size ` specifies the amount of threads to keep alive for as long as the ` ThreadPool ` exists and its channel remains connected . ` max_size ` specifies the maximum number of worker threads that may exist at the same time . ` keep_alive ` specifies the duration for which to keep non - core pool worker threads alive while they do not receive any work .
pub fn new(core_size: usize, max_size: usize, keep_alive: Duration) -> Self {
        static POOL_COUNTER: AtomicUsize = AtomicUsize::new(1);
        let name = format!(
            "rusty_pool_{}",
            POOL_COUNTER.fetch_add(1, Ordering::Relaxed)
        );
        ThreadPool::new_named(name, core_size, max_size, keep_alive)
    }
pub fn new ( core_size : usize , max_size : usize , keep_alive : Duration ) -> Self { static POOL_COUNTER : AtomicUsize = AtomicUsize :: new ( 1 ) ; let name = format ! ( " " POOL_COUNTER fetch_add ( 1 Ordering Relaxed ) ) ; ThreadPool :: new_named ( name , core_size , max_size , keep_alive ) }
Construct a new `ThreadPool` with the specified core pool size, max pool size
and keep_alive time for non-core threads.
Construct a new ` ThreadPool ` with the specified core pool size max pool size and keep_alive time for non - core threads .
core_size
usize
max_size
usize
keep_alive
Duration
core_size
usize
max_size
usize
keep_alive
Duration
panics
This function will panic if max_size is 0, lower than core_size or exceeds half
the size of usize. This restriction exists because two counters (total workers and
idle counters) are stored within one AtomicUsize.
This function will panic if max_size is 0 lower than core_size or exceeds half the size of usize . This restriction exists because two counters ( total workers and idle counters ) are stored within one AtomicUsize .