kawmra
09/04/2019, 3:56 PMsend
without suspension?
It seems Channel(0)#send
will suspend unless any receivers are consuming values.
It is okay if values will be lost when no receivers are consuming.bdawg.io
09/04/2019, 3:58 PMjw
09/04/2019, 3:58 PMDominaezzz
09/04/2019, 3:58 PMoffer
.elizarov
09/04/2019, 4:03 PMoffer
. then depending on channel capacity:
CONFLATED
-> offer always returns true, receiver is guaranteed to get the most recent value.
RENDEZVOUS
-> offer returns false when receiver is not waiting, the value is lost.kawmra
09/04/2019, 4:18 PMRENDEZVOUS
Channel’s offer
is exactly the one I was looking for!
I was considered using conflated channels, but that channel has at most one buffer so receivers will be received value when start consuming.