JTP
An implementation of a thread pool that is similar to ThreadPoolExecutor in java.
Usage
Install this library using cargo,
cargo add jtp
Or add this to your Cargo.toml:
[dependencies]
jtp = "0.1.1"
And use this library:
// Creates a thread pool.
let thread_pool = default
.core_pool_size // Sets the number of core threads.
.max_pool_size // Sets the maximum number of threads.
.channel_capacity // Sets the capacity of the task queue.
.rejected_handler
.build
.unwrap;
thread_pool.execute;
thread_pool.wait;
License
Apache License, Version 2.0, LICENSE-APACHE