BufferedAsListChannel

Creates a BufferedAsListChannel that batches its elements with a given CoroutineContext

Return

the BufferedAsListChannel created

Parameters

T

the type of element to batch. Must be non-nullable

coroutineContext

the CoroutineContext to use for batching


fun <T : Any> BufferedAsListChannel(coroutineContext: CoroutineContext, dispatcher: CloseableCoroutineDispatcher, closeDispatcherOnCompletion: Boolean): BufferedAsListChannel<T>

Creates a BufferedAsListChannel that batches its elements with a given CoroutineContext

Return

the BufferedAsListChannel created

Parameters

T

the type of element to batch. Must be non-nullable

coroutineContext

the CoroutineContext to use for batching

dispatcher

the CloseableCoroutineDispatcher to which grouping will be dispatched

closeDispatcherOnCompletion

if true the dispatcher will be closed once the channel is closed