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

Function increment

src/scope.rs:1628–1639  ·  view source on GitHub ↗
(
            counters: &'slice [&'counter AtomicUsize],
        )

Source from the content-addressed store, hash-verified

1626 })
1627 });
1628
1629 THREAD_POOL.depopulate();
1630 }
1631
1632 /// Tests that work spawned after a panicking job still completes.
1633 #[test]
1634 #[cfg_attr(not(panic = "unwind"), ignore)]
1635 fn scope_panic_propagate_still_execute_after() {
1636 static THREAD_POOL: ThreadPool = ThreadPool::new();
1637 THREAD_POOL.resize_to_available();
1638
1639 let mut x = false;
1640 let result = unwind::halt_unwinding(|| {
1641 THREAD_POOL.scope(|scope| {
1642 scope.spawn(|_: &Worker| panic!("Hello, world!")); // job A

Callers 1

scope_mixed_lifetimesFunction · 0.70

Calls 1

spawnMethod · 0.45

Tested by 1

scope_mixed_lifetimesFunction · 0.56