MCPcopy Create free account
hub / github.com/NthTensor/Forte / scope_panic_propagate_from_nested_spawn

Function scope_panic_propagate_from_nested_spawn

src/scope.rs:1474–1487  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 })

Callers

nothing calls this directly

Calls 4

resize_to_availableMethod · 0.80
scopeMethod · 0.80
depopulateMethod · 0.80
spawnMethod · 0.45

Tested by

no test coverage detected