7 releases

0.1.7 Aug 26, 2024
0.1.6 Aug 26, 2024
0.1.4 Jun 25, 2024
0.1.3 May 14, 2024

#38 in #thread-pool

Download history 292/week @ 2024-05-13 34/week @ 2024-05-20 2/week @ 2024-05-27 5/week @ 2024-06-03 3/week @ 2024-06-10 6/week @ 2024-06-17 146/week @ 2024-06-24 36/week @ 2024-07-01 1/week @ 2024-07-08 1/week @ 2024-07-29 4/week @ 2024-08-19 357/week @ 2024-08-26

361 downloads per month
Used in http-srv

MIT license

8KB
167 lines

Thread Pool

This is a Thread Pool library for rust.


lib.rs:

Thread Pool

This crate contains code to run a Job pool.

Example

use job_pool::*;
use std::thread;
use std::time::Duration;

let conf = PoolConfig::default();
let pool = ThreadPool::new(conf).unwrap();
for _ in 0..10 {
    pool.execute(|| {
        thread::sleep(Duration::from_secs(5));
    });
}
pool.join();

Dependencies

~235–680KB
~16K SLoC