We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18840b0 commit d65ab29Copy full SHA for d65ab29
library/std/src/sync/barrier.rs
@@ -129,7 +129,7 @@ impl Barrier {
129
if lock.count < self.num_threads {
130
// We need a while loop to guard against spurious wakeups.
131
// https://en.wikipedia.org/wiki/Spurious_wakeup
132
- while local_gen == lock.generation_id && lock.count < self.num_threads {
+ while local_gen == lock.generation_id {
133
lock = self.cvar.wait(lock).unwrap();
134
}
135
BarrierWaitResult(false)
0 commit comments