diff --git a/src/lib.rs b/src/lib.rs index 4996841..d168a9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -677,6 +677,14 @@ mod tests { let _tp = ThreadPool::new(); } + #[test] + fn thread_pool_with_one_thread() { + let _tp = ThreadPool::with_config(Config { + thread_count: Some(NonZero::new(1).unwrap()), + ..Default::default() + }); + } + #[test] fn join_basic() { let threat_pool = ThreadPool::new();