hey guys, I am really having a hard time understan...
# coroutines
m
hey guys, I am really having a hard time understand the
BroadcastArrayChannel
could someone try to explain it to me, especialy in which scenario this channel can be used?
d
You shouldn't use that class directly.
You should use the
BroadcastChannel
abstraction.
but fwiw
BroadcastArrayChannel
is a fixed-sized buffered
BroadcastChannel
.
m
yeah I know that I shouldnt use it directly I try to understand what is a Broadcastchannel with 1 capacity? what is the different if a broadcast channel has n capcities?
d
A broadcast channel with n capacity will hold up to n items before suspending the sender.
m
but n items for each receiver or n items for n receiver?
d
All receivers share the buffer.