1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-02-04 06:08:39 +02:00

doc: clarify the comment on Worker.work_done

We call `work_done` only once the work has been actually performed
(otherwise `num_pending` could go to 0 before the actual work is done).

Closes #2039
This commit is contained in:
Michal Terepeta 2021-10-24 15:40:52 +02:00 committed by Andrew Gallant
parent 3b66f37a31
commit cb7501ff11

View File

@ -1681,7 +1681,7 @@ impl<'s> Worker<'s> {
stack.pop()
}
/// Signal that work has been received.
/// Signal that work has been finished.
fn work_done(&self) {
self.num_pending.fetch_sub(1, Ordering::SeqCst);
}