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:
If the channel has been closed.
data |
a value |
the result which holds null if succeeded, or an error if failed. |