-
-
Save NoNews/1cb6c5fbf129e6efb486e9825edec408 to your computer and use it in GitHub Desktop.
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
CoroutineScope(context = Dispatchers.Main.immediate).launch() { | |
doAction() | |
flowOf("Hey") | |
.onEach { doAction() } | |
.map { it.length } | |
.onStart { doAction() } | |
.flowOn(Dispatchers.Default) | |
.flatMapMerge { | |
doAction() | |
flowOf(1) | |
.flowOn(Dispatchers.Main) | |
.onEach { doAction() } | |
} | |
.flowOn(Dispatchers.IO) | |
.collect { | |
doAction() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment