send
Description:
Sends a value into the channel. This method blocks the thread until the value is sent or the channel is closed.
If the channel is full, not unbuffered, and not closed, blocks until the channel has a space to hold the value.
If the channel is unbuffered, waits for a receive operation.
Errors:
- ChannelError.CLOSED
If the channel has been closed.
Parameters:
data |
a value |
Returns:
the result which holds null if succeeded, or an error if failed. |