diff --git a/src/lib.rs b/src/lib.rs index 1512723..1298a75 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -495,7 +495,8 @@ mod test { assert_eq!(rx.iter().take(test_tasks).fold(0, |a, b| a + b), test_tasks); // `iter().take(test_tasks).fold` may be faster than the last thread finishing itself, so // values of 0 or 1 are ok. - assert!(pool.active_count() <= 1); + let atomic_active_count = pool.active_count(); + assert!(atomic_active_count <= 1, "atomic_active_count: {}", atomic_active_count); } #[test]