Threads Pool
This package provides an easy way to create and manage thread pools, so you don't have to.
How to use
In your project's Cargo.toml
, add dependency:
[dependencies]
threads_pool = "^0.2.0"
Then in your code:
extern crate threads_pool;
use Duration;
use sleep;
use *;
The package also provide a static pool which you can create once, and use it everywhere in your application.
This is called the shared_mode
:
extern crate threads_pool;
use Duration;
use sleep;
use shared_mode;