Join Slack
Is there a reason why there aren’t delay functions for channels, and only for flows? <https://githu...
# coroutines
a
Allan Wang
06/07/2019, 5:58 PM
Is there a reason why there aren’t delay functions for channels, and only for flows?
https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt
Is it just that it isn’t as efficient to do so with hot streams?
e
elizarov
06/07/2019, 6:38 PM
It quickly becomes inefficient when you apply multiple operators to channel, so the pattern we want to enforce is that you take your input as flow, apply flow operators, then convert the result to the channel (
produceIn
operator) if channel is needed.
6
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by