From cb7501ff111d32f636138cfc8975289fc5001f50 Mon Sep 17 00:00:00 2001 From: Michal Terepeta Date: Sun, 24 Oct 2021 15:40:52 +0200 Subject: [PATCH] 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 --- crates/ignore/src/walk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ignore/src/walk.rs b/crates/ignore/src/walk.rs index 602faae..1f7d06e 100644 --- a/crates/ignore/src/walk.rs +++ b/crates/ignore/src/walk.rs @@ -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); }