Creates a broadcast channel with the specified buffer capacity.
The resulting channel type depends on the specified capacity parameter:
capacitypositive, but less than UNLIMITED – creates
ArrayBroadcastChannelwith a buffer of given capacity. Note: this channel looses all items that are send to it until the first subscriber appears;
capacityis CONFLATED – creates ConflatedBroadcastChannel that conflates back-to-back sends;
capacityis BUFFERED – creates
ArrayBroadcastChannelwith a default capacity.
- otherwise – throws IllegalArgumentException.
Note: This is an experimental api. It may be changed in the future updates.