Receiver
A Receiver is used to receive values from a channel. Receivers are input
iterators, used with for loops or .next().
Creating a Receiver
Receivers are created by the channel function:
Using a Receiver
Iteration with for
Single value with .next()
When the channel is closed and empty, .next() raises IterStop.
If the sender was closed with an error, .next() re-raises that error once any
buffered values have been drained.
Methods
close()
Closes the receiver. This prevents any more values from being sent and wakes up any waiting senders.