remove @fence (#21585)

closes #11650
This commit is contained in:
David Rubin
2024-10-04 15:21:27 -07:00
committed by GitHub
parent 163d505e27
commit 043b1adb8d
28 changed files with 25 additions and 271 deletions

View File

@@ -15,11 +15,10 @@ pub fn start(self: *WaitGroup) void {
}
pub fn finish(self: *WaitGroup) void {
const state = self.state.fetchSub(one_pending, .release);
const state = self.state.fetchSub(one_pending, .acq_rel);
assert((state / one_pending) > 0);
if (state == (one_pending | is_waiting)) {
self.state.fence(.acquire);
self.event.set();
}
}