Skip to content

Commit

Permalink
Fix one more spurious CAS failure (emina#199)
Browse files Browse the repository at this point in the history
Follow-up to emina#198.
  • Loading branch information
jamesbornholt authored Jul 23, 2021
1 parent 7cac2c9 commit 7ac31ff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rosette/lib/profile/record.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,13 @@
; all events from the box. if that happened then the ENTER we're trying
; to delete has already been published, and so we need to retain the
; corresponding EXIT.
(unless (box-cas! the-box evts (cdr evts))
(do-record-exit! out))]))))))
(let loop ()
(unless (box-cas! the-box evts (cdr evts))
(if (eq? evts (unbox the-box))
; spurious CAS failure; retry
(loop)
; box has changed, so we need to retain the EXIT
(do-record-exit! out))))]))))))

; Default version just uses the current-profile/current-reporter params
(define default-record-exit
Expand Down

0 comments on commit 7ac31ff

Please sign in to comment.