File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -677,14 +677,16 @@ fun main() = runBlocking<Unit> {
677677
678678Notice how ` flow { ... } ` works in the background thread, while collection happens in the main thread:
679679
680- <!-- - TEST FLEXIBLE_THREAD
680+ ``` text
681681[DefaultDispatcher-worker-1 @coroutine#2] Emitting 1
682682[main @coroutine#1] Collected 1
683683[DefaultDispatcher-worker-1 @coroutine#2] Emitting 2
684684[main @coroutine#1] Collected 2
685685[DefaultDispatcher-worker-1 @coroutine#2] Emitting 3
686686[main @coroutine#1] Collected 3
687- -->
687+ ```
688+
689+ <!-- - TEST FLEXIBLE_THREAD -->
688690
689691Another thing to observe here is that the [ flowOn] operator has changed the default sequential nature of the flow.
690692Now collection happens in one coroutine ("coroutine#1") and emission happens in another coroutine
You can’t perform that action at this time.
0 commit comments