10 releases

0.1.10 Jan 29, 2025
0.1.9 Jan 1, 2025
0.1.8 Dec 30, 2024
0.1.7 Aug 26, 2024
0.1.3 May 14, 2024

#27 in #job

Download history 1/week @ 2024-11-19 21/week @ 2024-12-10 83/week @ 2024-12-24 196/week @ 2024-12-31 9/week @ 2025-01-07 128/week @ 2025-01-28 5/week @ 2025-02-04 208/week @ 2025-02-11

341 downloads per month
Used in http-srv

MIT license

13KB
308 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

~0.2–1.6MB
~24K SLoC