Question: Is there a way to supply something like ...
# coroutines
v
Question: Is there a way to supply something like
Channel
's
onUndeliveredElement
param, except for
conflate()
? I'm trying to emit some values through a Flow that need to be `close()`d, however there is backpressure build up and I would like to
close()
the values that are dropped by
conflate()
. Since I'm using
callbackFlow
the closest I could come up with is to
trySend()
and
close()
if that fails, but that will have the behavior equivalent of
DROP_LATEST
, while I'm really looking for
DROP_OLDEST
.
l
Don't know much about the issue. But maybe this can give you and idea https://medium.com/google-developer-experts/backpressure-in-your-kotlin-flows-3eec980869c7
v
I'm familiar with how flows and backpressure work... this is more likely to be a coroutine API feature request unless I'm missing something