ChannelIterator

interface ChannelIterator<out E>(source)

Iterator for a ReceiveChannel. Instances of this interface are not thread-safe and shall not be used from concurrent coroutines.

Functions

Link copied to clipboard
abstract suspend operator fun hasNext(): Boolean

Prepare an element for retrieval by the invocation of next.

Link copied to clipboard
abstract operator fun next(): E

Retrieves the element removed from the channel by the preceding call to hasNext, or throws an IllegalStateException if hasNext was not invoked.