rocketraman
01/29/2024, 5:41 PMStateFlow
. I need a derived Flow
which can select from either one of the two channels, or both, based on the value of the StateFlow
. Doing it with a mapLatest
and a select
clause generally works, but occasionally one of the channels will have an "undelivered element". I believe its because the select cancellation in mapLatest
when the StateFlow
value changes is racing with the send
to the channel.
Is there another approach here that would work?rocketraman
01/29/2024, 10:09 PMFlow
.