Sender
A Sender is used to send values into a channel. Senders are output iterators,
used with put or the .put() method.
Creating a Sender
Senders are created by the channel function:
Using a Sender
Send values using put or .put():
Methods
close error? :backtrace?
Closes the sender, signaling EOF to receivers. After closing:
- Sends will fail
- Receivers will eventually see no more values
- If
erroris provided, the receiver re-raises it from.next()once any buffered values have been drained
Parameters:
| Name | Type | Description |
|---|---|---|
error |
Optional error value to propagate | |
backtrace |
strand.Backtrace? |
Optional backtrace for that error |