dead_pool/lib.rs
1//! # Dead-Pool
2//!
3//! `dead-pool` provides a pool of threads waiting for a job.
4//! Jobs can be sent via `execute` method defined on `ThreadPool`.
5pub use threadpool::ThreadPool;
6
7mod threadpool;
8mod worker;
9
10#[cfg(test)]
11mod tests {
12 use crate::ThreadPool;
13
14 #[test]
15 fn test1() {
16 let pool = ThreadPool::new(4);
17 for _ in 0..100 {
18 pool.execute(|| {
19 println!("Working");
20 });
21 }
22 }
23}