ConcurrentUtils-0.4.4.0: Concurrent utilities

Safe HaskellSafe
LanguageHaskell98

Control.CUtils.Processes

Description

An implementation of communicating sequential processes.

Synopsis

Documentation

data CSP Source

The CSP data type:

:|| - interleave

:? - deterministic choice

Join - interface parallel

:-> - prefix

Stop - empty computation

Do - execute IO, then behave as the returned process

Constructors

CSP :|| CSP 
CSP :? CSP 
Join CSP [String] CSP 
String :-> CSP infixr 1 
Stop 
Do (IO CSP) 

Instances

runCSP0 :: (String -> IO (), Chan String) -> [(MVar Side, String, Side)] -> CSP -> IO () Source

runCSP :: CSP -> IO () Source

Run a CSP computation.