https://kotlinlang.org logo
#coroutines
Title
# coroutines
v

voben

12/13/2019, 10:49 PM
If I want to reproduce the behavior of Rx PublishSubject by using a ConflatedChannel. Should I be using the
offer
or
send
function to send a value to the channel and why?
z

Zach Klippenstein (he/him) [MOD]

12/13/2019, 11:12 PM
For
ConflatedChannel
,
offer
and
send
have the same behavior (i.e.
send
will never suspend). Usually
offer
is the only one you can actually use because you’re sending from a non-suspending method.
v

voben

12/14/2019, 12:13 AM
thx
5 Views