()
| 1472 | |
| 1473 | THREAD_POOL.depopulate(); |
| 1474 | } |
| 1475 | |
| 1476 | #[test] |
| 1477 | fn scope_nesting() { |
| 1478 | static THREAD_POOL: ThreadPool = ThreadPool::new(); |
| 1479 | THREAD_POOL.resize_to_available(); |
| 1480 | |
| 1481 | let mut completed = false; |
| 1482 | |
| 1483 | THREAD_POOL.scope(|scope| { |
| 1484 | scope.spawn(|worker: &Worker| { |
| 1485 | worker.scope(|scope| { |
| 1486 | scope.spawn(|_: &Worker| { |
| 1487 | completed = true; |
| 1488 | }) |
| 1489 | }) |
| 1490 | }) |
nothing calls this directly
no test coverage detected