|Portability||non-portable (requires Futures)|
This module implements a channel synchronisation primitive using buffers that block on futures. A channel is a linked list of buffers. It has a read-end at one side and a write-end at the other. Elements put into the channel can be read out in a first in, first out order. A read and a write operation can be executed in parallel by several threads. A channel has no capacity bounding.
The module contains similar functions as
Warning: All operations on channels should only be used within the global wrapper function
A channel consists of a read-end buffer and a write-end buffer. The Itemtype is required to link the buffers in the channel.
Writes one value to a channel. A
writeChan never blocks, since channels have
no bounding limiters.
Reads out an item from the read-head of the channel. It blocks on a empty channel.
Implements the same behaviour as writeChanContents from the module Control.Concurrent.Chan.
Implements the same behaviour as getChanContents from the module Control.Concurrent.Chan. It reads permanently from the channel.