IORefCAS-0.0.1.2: Atomic compare and swap for IORefs and STRefs.
Data.CAS.Internal.Fake
Description
This is an attempt to imitate a CAS using normal Haskell/GHC operations. Useful for debugging.
Synopsis
data CASRef a Source
The type of references supporting CAS.
Instances
casIORef :: IORef a -> a -> a -> IO (Bool, a)Source
ptrEq :: a -> a -> BoolSource
atomicModifyIORefCAS :: IORef a -> (a -> (a, b)) -> IO bSource
atomicModifyIORefCAS_ :: IORef a -> (a -> a) -> IO ()Source