bezrukov
09/06/2020, 5:30 PMval flow = flowOf(1, 2)
produce(capacity = 0) { flow.collect { send(it) } }.consumeAsFlow()
.onEach { println("each $it") }
.launchIn(this)
I would expect there will be no difference comparing with:
val flow = flowOf(1, 2)
flow.onEach { println("each $it") }
.launchIn(this)
Link demonstrates unnecessary redispatch: https://pl.kotl.in/LbbXNwWzUgildor
09/06/2020, 11:50 PM