receive


Description:

public int receive ()

Receives a value from the channel, blocking until one is available. Returns the default value (0) if the channel is closed and empty.

Returns:

the received value or 0 if closed and empty.