BroadcastChannel
fun <E> BroadcastChannel(capacity: Int): BroadcastChannel<E>
(source)Platform and version requirements: JVM
Creates a broadcast channel with the specified buffer capacity.
The resulting channel type depends on the specified capacity parameter:
- when
capacity
positive, but less than UNLIMITED – creates ArrayBroadcastChannel; - when
capacity
is CONFLATED – creates ConflatedBroadcastChannel that conflates back-to-back sends; - otherwise – throws IllegalArgumentException.