I'm really just interested in the latest offer
# coroutines
p
I'm really just interested in the latest offer
d
If the latest offer is not getting received as expected, you could try using
runBlocking { channel.send(...) }
instead... offer wont send anything on a conflated channel if any of your 10 sec. functions are still running after cancel while offer is trying to send something (you can test this by logging offers return value, if its true it got sent...). So you might not be getting even the latest offer... its a bit tricky, just make sure the behavior is really what youre expecting.
I take that back, conflated keeps a buffer of 1, so youre ok. In my use case i needed something else, so i was having those problems... 😄