|
Control.Concurrent.TxEvent.NWaySChan.Ver3 | Portability | non-portable (requires TxEvent) | Stability | experimental | Maintainer | mfluet@acm.org |
|
|
|
|
|
Description |
Synchronous N-Way Channels.
This library provides synchronous n-way channels, a generalization
of SChan.
This library improves upon
Control.Concurrent.TxEvent.NWaySChan.Ver2, by using the total order
on ThreadIds to limit the possible interleavings of
communications. Note that this does not require breaking the Evt
abstraction.
|
|
Synopsis |
|
|
|
|
Synchronous n-way channels
|
|
data NWaySChan a |
An NWaySChan is a synchronous n-way channel, used for communication
between concurrent threads. Message passing is synchronous: n
distinct threads must be ready to communicate; each thread sends one
value and receives n-1 values.
|
|
|
newNWaySChan :: Int -> Evt (NWaySChan a) |
Create a new n-way synchronous channel.
|
|
swapEvt :: NWaySChan a -> a -> Evt [a] |
Send a value on the channel and receive n-1 values on the channel.
|
|
Produced by Haddock version 0.7 |