Concurrent.Channel
Definitions
@LoweringTargetChannel Retrieves an element from the channel c. This is blocking if the
channel is empty.
Implements to the expression <- c.
@LoweringTargetChannel Returns the MpmcAdmin of c.
@LoweringTargetChannel Creates a new channel. A runtime error occurs if bufferSize is
negative. A channel with bufferSize zero means that sending and
receiving is syncronized.
@LoweringTargetChannel Creates a new channel tuple (sender, receiver)
@LoweringTargetChannel Sends the element e on the channel c. This is blocking if the
channel is full or unbuffered.
Implements the expression c <- e.
@LoweringTargetChannel def selectFrom(channels: List[MpmcAdmin], blocking: Bool): (Int32, List[ReentrantLock]) \ IO§ SourceReturns the index of the first channel that has an element in the array
along with a set of locks to be unlocked after retrieval.
Returns (-1, _) if no channels have elements and blocking == false,
otherwise this blocks.
OBS: In the blocking case, caller Must call unlockLocks on the
returned list of locks post call.
In the non-blocking case, selectFrom unlocks all locks first