toList

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

Returns a List containing all elements.

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