IORefCAS-0.2: Atomic compare and swap for IORefs and STRefs.

Safe HaskellSafe-Infered

Data.CAS.Internal.Fake

Description

This is an attempt to imitate a CAS using normal Haskell/GHC operations. Useful for debugging.

Synopsis

Documentation

data CASRef a

The type of references supporting CAS.

Instances

casIORef :: IORef a -> a -> a -> IO (Bool, a)

ptrEq :: a -> a -> Bool

atomicModifyIORefCAS :: IORef a -> (a -> (a, b)) -> IO b

atomicModifyIORefCAS_ :: IORef a -> (a -> a) -> IO ()