tseisel
07/23/2019, 2:00 PMFlow
to a Channel
than the following ?
flow {
coroutineScope {
val channel = produce {
aFlow.collect { send(it) }
}
}
}
I want to write a custom logic for combining 2 `Flow`s, zip
and combineLatest
don't fit my use case.streetsofboston
07/23/2019, 2:12 PMzip
and combineLatest
, copy it and then modify it for your use-case.Zach Klippenstein (he/him) [MOD]
07/23/2019, 5:20 PMval channel = aFlow.produceIn(this)
It’s more concise, but it also integrates with channel operator fusion so if the source flow is already backed by a channel, it won’t (necessarily) create another one.