Previously, the call to bookkeeping::increment() was never paired with a decrement when the spawn failed (due to unwinding). This fixes the problem by returning a "bomb" from increment() which will decrement on drop, and then moving the bomb into the child task's procedure which will be dropped naturally. |
||
|---|---|---|
| .. | ||
| io | ||
| lib.rs | ||
| task.rs | ||