Last active
October 13, 2019 19:50
-
-
Save jshvarts/c83d9fe729a8553f77cd186486cfb38a to your computer and use it in GitHub Desktop.
Basic subscribeOn and observeOn case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.just("long", "longer", "longest") | |
.subscribeOn(Schedulers.io()) | |
.map(String::length) | |
.observeOn(Schedulers.computation()) | |
.filter { it > 6 } | |
.subscribe { length -> println("item length $length") } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment