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
capacitypositive, but less than UNLIMITED – creates ArrayBroadcastChannel; - when
capacityis CONFLATED – creates ConflatedBroadcastChannel that conflates back-to-back sends; - otherwise – throws IllegalArgumentException.