toList

suspend fun <E> ReceiveChannel<E>.toList(): List<E> (source)

Platform and version requirements: JVM

Returns a List containing all elements.

The operation is terminal. This function consumes all elements of the original ReceiveChannel.