There was an error while loading. Please reload this page.
1 parent 3af1f71 commit 3bad774Copy full SHA for 3bad774
1 file changed
src/kcas/kcas.ml
@@ -514,11 +514,9 @@ let[@inline] rec cas_with_state loc before state state_old =
514
true
515
end
516
else
517
- (* We must retry, because compare is by value rather than by state.
518
-
519
- Because we don't usually change location state on no-op updates (to
520
- avoid unnecessary wakeups), we should mostly fail spuriously due to
521
- some other thread having installed or removed a waiter.
+ (* We must retry, because compare is by value rather than by state. In
+ other words, we should not fail spuriously due to some other thread
+ having installed or removed a waiter.
522
523
Fenceless is safe as there was a fence before. *)
524
cas_with_state loc before state (fenceless_get (as_atomic loc)))
0 commit comments