IORefCAS-0.0.1: Atomic compare and swap for IORefs and CASRefs.

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 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