iterator

fun iterator(): ChannelIterator<E> (source)

Overrides ReceiveChannel.iterator

Platform and version requirements: JVM

Returns new iterator to receive elements from this channels using for loop. Iteration completes normally when the channel is isClosedForReceive without cause and throws the original close cause exception if the channel has failed.