mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-04-19 09:02:15 +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:
parent
3b66f37a31
commit
cb7501ff11
@ -1681,7 +1681,7 @@ impl<'s> Worker<'s> {
|
|||||||
stack.pop()
|
stack.pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Signal that work has been received.
|
/// Signal that work has been finished.
|
||||||
fn work_done(&self) {
|
fn work_done(&self) {
|
||||||
self.num_pending.fetch_sub(1, Ordering::SeqCst);
|
self.num_pending.fetch_sub(1, Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user