@@ -203,7 +203,7 @@ I'm not blocked 3
203
203
204
204
Notice the following differences in the code with the [ Flow] from the earlier examples:
205
205
206
- * A builder function for [ Flow] type is called [ flow] .
206
+ * A builder function for [ Flow] type is called [ flow] [ _flow ] .
207
207
* Code inside the ` flow { ... } ` builder block can suspend.
208
208
* The ` simple ` function is no longer marked with ` suspend ` modifier.
209
209
* Values are _ emitted_ from the flow using [ emit] [ FlowCollector.emit ] function.
@@ -214,7 +214,7 @@ thread is blocked in this case.
214
214
215
215
### Flows are cold
216
216
217
- Flows are _ cold_ streams similar to sequences &mdash ; the code inside a [ flow] builder does not
217
+ Flows are _ cold_ streams similar to sequences &mdash ; the code inside a [ flow] [ _flow ] builder does not
218
218
run until the flow is collected. This becomes clear in the following example:
219
219
220
220
<div class =" sample " markdown =" 1 " theme =" idea " data-min-compiler-version =" 1.3 " >
@@ -1785,7 +1785,7 @@ coroutine only without cancelling the whole scope or to [join][Job.join] it.
1785
1785
1786
1786
### Flow cancellation checks
1787
1787
1788
- For convenience, the [ flow] builder performs additional [ ensureActive] checks for cancellation on each emitted value.
1788
+ For convenience, the [ flow] [ _flow ] builder performs additional [ ensureActive] checks for cancellation on each emitted value.
1789
1789
It means that a busy loop emitting from a ` flow { ... } ` is cancellable:
1790
1790
1791
1791
<div class =" sample " markdown =" 1 " theme =" idea " data-min-compiler-version =" 1.3 " >
@@ -1944,7 +1944,7 @@ Integration modules include conversions from and to `Flow`, integration with Rea
1944
1944
[ CancellationException ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-cancellation-exception/index.html
1945
1945
<!-- - INDEX kotlinx.coroutines.flow -->
1946
1946
[ Flow ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html
1947
- [ flow ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
1947
+ [ _flow ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
1948
1948
[ FlowCollector.emit ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow-collector/emit.html
1949
1949
[ collect ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/collect.html
1950
1950
[ flowOf ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow-of.html
0 commit comments