rcu-0: Read-Copy-Update with Quiescent-State-Based Reclamation

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.RCU.Class

Synopsis

Documentation

class Monad m => MonadRead m where Source

This is a read-side critical section

Minimal complete definition

Nothing

Associated Types

type Ref m :: * -> * Source

Methods

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

readRef :: Ref m a -> m a Source

class MonadRead m => MonadWrite m where Source

This is a write-side critical section

Minimal complete definition

Nothing

Methods

writeRef :: Ref m a -> a -> m () Source

synchronize :: m () Source

class (MonadRead (ReadT m), MonadWrite (WriteT m), Monad m) => MonadRCU m where Source

This is the executor service that can fork, join and execute critical sections.

Associated Types

type ReadT m :: * -> * Source

type WriteT m :: * -> * Source

type Thread m :: * -> * Source

Methods

fork :: m a -> m (Thread m a) Source

join :: Thread m a -> m a Source

read :: ReadT m a -> m a Source

write :: WriteT m a -> m a Source