Go backward to send : Sending a MessageGo up to 5.3 Basic Communication |
receive
: Receiving a Mesagem = c.receive() Message m InChannel c m = c.receive(t) Message m InChannel c int t;
The first variant returns a message from channel c; if c is empty, the current node is blocked until c becomes non-empty.
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 c is still empty, null
is
returned.
Which message is returned from c depends on the selector associated to c; by default, this is the oldest message held by c.