Portability | non-portable (requires Futures) |
---|---|
Stability | experimental |
Maintainer | willig@ki.informatik.uni-frankfurt.de |
This modules combines a quantity semaphore from the module Control.Concurrent.Fututes.QSem and a channel from
module Control.Concurrent.Fututes.Chan to a new synchronisation primitive. Bounded channels have a limited
capacity of storage cells.
Warning: All operations on bounded channels should only be used within the
global wrapper function Futures.withFuturesDo
!
Documentation
readBChan :: BChan a -> IO aSource
Performs an up-operation on the QSem of the bounded channel and then reads a value from the channel. The read operation may block.
writeBChan :: BChan a -> a -> IO ()Source
Performs a down-operations on the QSem of the bounded channel and writes a new value to it. The down-operation may block.