Implements bounded channels. These channels differ from normal
that they are guaranteed to contain no more than a certain number of
elements. This is ideal when you may be writing to a channel faster than you
are able to read from it.
This module supports all the functions of Control.Concurrent.Chan except
dupChan, which are not supported for bounded channels.
newBoundedChan n returns a channel than can contain no more than
Write an element to the channel. If the channel is full, this routine will block until it is able to write. If you have multiple writers, be careful here, because the unlocking is not guaranteed to avoid starvation.
Read an element from the channel. If the channel is empty, this routine will block until it is able to read.
Return a lazy list representing the contents of the supplied channel.