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

Data.CAS

Contents

Description

Atomic compare and swap for IORefs and STRefs.

Synopsis

Documentation

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

Generic interface: for interoperation with Fake and Foreign alternative libraries.

data CASRef a Source

The type of references supporting CAS.

Instances