next
Awaits for the next item from the channel.
Return
The next item from the channel.
Awaits for the next item from the channel, or null if the timeout is reached.
Return
The next item from the channel, or null.
Awaits for the next N items from the channel. This method will suspend indefinitely until N items are received.
Return
A list of the next N items from the channel.
Parameters
n
The number of items to receive from the channel.
Awaits for the next N items from the channel, or until the timeout is reached. Once the timeout is reached, the list of received items is returned, even if fewer than N items have been received.
Return
A list of the received items.
Parameters
n
The number of items to receive from the channel.
timeout
The maximum time to wait for items.