public class BroadcastChannelKt
Modifier and Type | Method and Description |
---|---|
static <E> BroadcastChannel<E> |
BroadcastChannel(int capacity)
Creates a broadcast channel with the specified buffer capacity.
|
public static <E> BroadcastChannel<E> BroadcastChannel(int capacity)
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
with a buffer of given capacity.
Note: this channel looses all items that are send to it until the first subscriber appears;
when capacity
is CONFLATED -- creates class ConflatedBroadcastChannel
that conflates back-to-back sends;
otherwise -- throws IllegalArgumentException.
Note: This is an experimental api. It may be changed in the future updates.