cs & threads: another spurious-CAS-failure accomodation
This commit is contained in:
parent
f38ffc53ed
commit
1118705bef
|
@ -57,6 +57,10 @@
|
|||
(loop))))
|
||||
|
||||
(define (lock-release lock)
|
||||
(unless (box-cas! lock 1 0)
|
||||
(internal-error "lock release failed!"))
|
||||
(end-future-uninterrupted))
|
||||
(cond
|
||||
[(box-cas! lock 1 0)
|
||||
(end-future-uninterrupted)]
|
||||
[(eq? (unbox lock) 0)
|
||||
;; not just a spurious failure...
|
||||
(internal-error "lock release failed!")]
|
||||
[else (lock-release lock)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user