previous up next
Go backward to getChannel: Retrieving a Channel from a Set
Go up to 5.4 Channel Sets
RISC-Linz logo

select: Selecting a Channel from a Set

i = s.select()
i = s.select(t)
  int i
  InChannelSet s
  int t

The first variant returns the index of a non-empty channel in the (non-empty) set s; if all channels are empty, the current node is blocked until a channel becomes non-empty. This index may be used to reference the corresponding channel in the set.

The second variant behaves like the first one except for the fact that the current node is blocked for at most t time units. If then all channels are still empty, -1 is returned.


Maintainer: Wolfgang Schreiner
Last Modification: November 14, 1997

previous up next