BroadcastChannel is deprecated in the favour of SharedFlow and StateFlow, and is no longer supported
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 have been sent to it until the first subscriber appears;
capacityis BUFFERED -- creates
ArrayBroadcastChannelwith a default capacity.
otherwise -- throws IllegalArgumentException.