You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behaviour is expected, as merge (and the corresponding flat* operators) is concurrent operator and merges all the upstreams concurrently (the level of concurrency is determined by the dispatcher). Any exception effectively cancels both upstreams and downstream, throwing away all the in-flight elements, so the exception is delivered as soon as possible. Exceptions for a regular control flow are not recommended both in regular code and flows.
My use case is that I want to implement a takeUntil using a coroutine:
When using
merge
, if I have a flow that instead of terminate it fails and I never get the last emitted value. Example:the output is:
There is a missing
collect 2
.I checked that using
.flattenMap
and.flatMapMerge
have the same issue.My use case is that I want to implement a
takeUntil
using a coroutine:The text was updated successfully, but these errors were encountered: