elizarov
02/07/2017, 7:42 AMkotlinx.coroutines
version 0.7-beta
is published. It includes production-quality mostly lock-free implementation of Go-style channels that enable coroutines to safely share streams of arbitrary elements or messages without actually sharing any mutable state (e.g. share data by communicating). More details here: https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md#channelsdefhlt
02/07/2017, 9:26 AMkenkyee
02/07/2017, 12:10 PMdefhlt
02/07/2017, 12:35 PMfor
, if
and so on with it, but you can’t with rxjava (you need filter
, doOnEach
and so on)elizarov
02/07/2017, 1:22 PMdefhlt
02/07/2017, 1:46 PMelizarov
02/07/2017, 2:10 PMselect
. Something like:
select {
chan1.receive() { elem1 -> doSmth(elem1) }
chan2.receive() { elem2 -> doSmth(elem2) }
}
kotlinx.coroutines
library. Kotlin as a language is powerful enough, so that all those features can be written in a library.