zak.taccardi
05/08/2019, 7:22 PMChannel<T>
and Flow<T>
don’t share the same backing interface? It seems unfortunate that the two won’t be able to share the same operatorselizarov
05/08/2019, 7:26 PMzak.taccardi
05/08/2019, 7:28 PMChannel<T>
and Flow<T>
are that they both emit values of T
. The implementation detail is how they emit valuesaltavir
05/08/2019, 7:37 PMzak.taccardi
05/08/2019, 7:43 PMFlow<T>
and Channel<T>
as a way to consume multiple values of T
over timelouiscad
05/08/2019, 8:35 PMFlow
and ReceiveChannel
. They are still different as consuming or iterating a channel doesn't share the scope with the producer (and the produced may not even be in a coroutine at all), while a Flow
collecting coroutine will share its scope with the emitting collector, passing any failures through. Also, a Flow
emitting collector can always throttle the collecting coroutine, which is not the case for Channel
.zak.taccardi
05/08/2019, 8:35 PMFlow<T>
and ReceiveChannel<T>
, not Channel<T>
elizarov
05/08/2019, 10:29 PMasFlow()
.louiscad
05/08/2019, 11:10 PMasFlow()
extension for ReceiveChannel
as of kotlinx.coroutines 1.2.1Paul Woitaschek
05/09/2019, 9:29 AMasFlow()
on BroadcastChannel
elizarov
05/09/2019, 2:49 PMasFlow() = flow { consumeEach { emit(it) } }
louiscad
05/09/2019, 4:09 PMelizarov
05/09/2019, 4:48 PMconsumeAsFlow
? Etc....