receiveBatch

suspend fun <E> receiveBatch(channel: ReceiveChannel<E>, maxTimeMillis: Long, maxSize: Int): List<E>

Receive a batch of items from a channel, up to time and batch size limits.

Return

the list of items in the order received

Parameters

channel

the channel to receive items from

maxTimeMillis

maximum time in milliseconds to wait for items

maxSize

maximum batch size