test repair related to spurious CAS failure

This commit is contained in:
Matthew Flatt 2021-03-28 20:25:45 -06:00
parent 920e3dbde5
commit b320a1a114

View File

@ -7,6 +7,7 @@
;; run if it takes a lock)
(define (box-cas!* b old new)
(memory-order-release) ; makes spurious-failure check meaningful (I think)
(or (box-cas! b old new)
;; Try again if failure looks spurious:
(and (eq? (unbox b) old)