Safe Haskell | None |
---|
Documentation
:: STRef s a | The |
-> a | The |
-> a | The |
-> ST s (Bool, a) |
Performs a machine-level compare and swap operation on an
STRef
. Returns a tuple containing a Bool
which is True
when a
swap is performed, along with the current
value from the STRef
.
Note "compare" here means pointer equality in the sense of
reallyUnsafePtrEquality#
.
:: IORef a | The |
-> a | The |
-> a | The |
-> IO (Bool, a) |
Performs a machine-level compare and swap operation on an
IORef
. Returns a tuple containing a Bool
which is True
when a
swap is performed, along with the current
value from the IORef
.
Note "compare" here means pointer equality in the sense of
reallyUnsafePtrEquality#
.