Source codeContentsIndex
Control.Concurrent.TxEvent.TriSChan.Ver4
Portabilitynon-portable (requires TxEvent)
Stabilityexperimental
Maintainermfluet@acm.org
Contents
Synchronous 3-way channels
Description

Synchronous 3-Way Channels.

This library provides synchronous 3-way channels, a generalization of SChan.

This library improves upon Control.Concurrent.TxEvent.TriSChan.Ver3, by using a helper thread to limit the possible interleavings of communications. The downside is that newTriSChan must be an IO action.

Synopsis
data TriSChan a
newTriSChan :: IO (TriSChan a)
swapEvt :: TriSChan a -> a -> Evt (a, a)
Synchronous 3-way channels
data TriSChan a
An TriSChan is a synchronous 3-way channel, used for communication between concurrent threads. Message passing is synchronous: 3 distinct threads must be ready to communicate; each thread sends one value and receives 2 values.
newTriSChan :: IO (TriSChan a)
Create a new 3-way synchronous channel.
swapEvt :: TriSChan a -> a -> Evt (a, a)
Send a value on the channel and receive 2 values on the channel.
Produced by Haddock version 0.7