Skip to content

Commit 3bad774

Browse files
committed
Rewrite comment for clarity
1 parent 3af1f71 commit 3bad774

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/kcas/kcas.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,9 @@ let[@inline] rec cas_with_state loc before state state_old =
514514
true
515515
end
516516
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.
517+
(* We must retry, because compare is by value rather than by state. In
518+
other words, we should not fail spuriously due to some other thread
519+
having installed or removed a waiter.
522520
523521
Fenceless is safe as there was a fence before. *)
524522
cas_with_state loc before state (fenceless_get (as_atomic loc)))

0 commit comments

Comments
 (0)