BufferedAsListChannel

Creates a BufferedAsListChannel that batches its elements with a given CoroutineContext

Return

the BufferedAsListChannel created

Parameters

coroutineContext

the CoroutineContext to use for batching

Type Parameters

T

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


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

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

Type Parameters

T

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