Skip to content

Commit aa72711

Browse files
authored
Extract example output from comment to text block (#4018)
1 parent 918b1cc commit aa72711

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/topics/flow.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,14 +677,16 @@ fun main() = runBlocking<Unit> {
677677

678678
Notice 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

689691
Another thing to observe here is that the [flowOn] operator has changed the default sequential nature of the flow.
690692
Now collection happens in one coroutine ("coroutine#1") and emission happens in another coroutine

0 commit comments

Comments
 (0)