|
| Control.Concurrent.TxEvent.NWaySChan.Ver4 | | 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.Ver3, by using a helper thread
to limit the possible interleavings of communications. The
downside is that newNWaySChan must be an IO action.
|
|
| 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 -> IO (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 |