Source codeContentsIndex
Control.Concurrent.TxEvent.NWaySChan.Ver2
Portabilitynon-portable (requires TxEvent)
Stabilityexperimental
Maintainermfluet@acm.org
Contents
Synchronous n-way channels
Description

Synchronous N-Way Channels.

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

Synopsis
data NWaySChan a
newNWaySChan :: Int -> Evt (NWaySChan a)
swapEvt :: NWaySChan a -> a -> Evt [a]
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