Commit dce19dea authored by Peter Bell's avatar Peter Bell
Browse files

Hold lock in latch::count_down to avoid cv destruction before notify

parent 3eb10bb4
......@@ -744,12 +744,10 @@ class latch
latch(size_t n): num_left_(n) {}
void count_down()
lock_t lock(mut_);
if (--num_left_)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment