uni-reactor-2.2.1.0: Reactors for the uniform workbench

Reactor.ReferenceVariables

Description

  • Reentrant, protected references: an IORef in an MVar, protected by - a reentrant monitor. - - The operations which change the value (setRef, changeRef, withRef) - are protected by the monitor, which additionally provides a reentrant - synchronize method.

Documentation

data Ref a Source

Instances

newRef :: a -> IO (Ref a)Source

setRef :: Ref a -> a -> IO ()Source

changeRef :: Ref a -> (a -> a) -> IO ()Source

changeRefM :: Ref a -> (a -> IO a) -> IO ()Source

withRef :: Ref a -> (a -> b) -> IO bSource

getRef :: Ref a -> IO aSource