JTP
An implementation of a thread pool that is similar to ThreadPoolExecutor in java.
Usage
Install this library using cargo,
cargo install jtp
Or add this to your Cargo.toml:
[dependencies]
jtp = "0.1.0"
And use this library:
// Creates a thread pool.
let mut thread_pool = default
.set_core_pool_size // Sets the number of core threads.
.set_max_pool_size // Sets the maximum number of threads.
.set_channel_capacity // Sets the capacity of the task queue.
.set_rejected_hask_handler
.build
.unwrap;
for _ in 0..50
License
Apache License, Version 2.0, LICENSE-APACHE