Extensions for java.util.stream.Stream

asReceiveChannel

fun <E> Stream<E>.asReceiveChannel(
    context: CoroutineContext = CommonPool
): ReceiveChannel<E>

Creates a ProducerJob to read all element of the Stream.