Skip to content

Commit d3ead6f

Browse files
committed
Merge branch 'master' into develop
2 parents 3dcc349 + d281a7c commit d3ead6f

File tree

7 files changed

+22
-19
lines changed

7 files changed

+22
-19
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ normally and is only used by the debugger. To exclude it at no loss of functiona
167167
`android` block in your Gradle file for the application subproject:
168168
```groovy
169169
packagingOptions {
170-
exclude "DebugProbesKt.bin"
170+
resources.excludes += "DebugProbesKt.bin"
171171
}
172172
```
173173

docs/kc.tree

+15-15
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
name="Kotlin coroutines"
88
start-page="coroutines-guide.md">
99

10-
<toc-element id="coroutines-guide.md"/>
11-
<toc-element id="async-programming.md"/>
12-
<toc-element id="coroutines-basics.md" accepts-web-file-names="basics.html,coroutines-basic-jvm.html"/>
13-
<toc-element toc-title="Intro to coroutines and channels – hands-on tutorial" href="https://play.kotlinlang.org/hands-on/Introduction%20to%20Coroutines%20and%20Channels/"/>
14-
<toc-element id="cancellation-and-timeouts.md"/>
15-
<toc-element id="composing-suspending-functions.md"/>
16-
<toc-element id="coroutine-context-and-dispatchers.md"/>
17-
<toc-element id="flow.md"/>
18-
<toc-element id="channels.md"/>
19-
<toc-element id="exception-handling.md"/>
20-
<toc-element id="shared-mutable-state-and-concurrency.md"/>
21-
<toc-element id="select-expression.md"/>
22-
<toc-element id="debug-coroutines-with-idea.md"/>
23-
<toc-element id="debug-flow-with-idea.md"/>
24-
10+
<chunk include-id="coroutines">
11+
<toc-element id="coroutines-guide.md"/>
12+
<toc-element id="coroutines-basics.md" accepts-web-file-names="basics.html,coroutines-basic-jvm.html"/>
13+
<toc-element toc-title="Intro to coroutines and channels – hands-on tutorial" href="https://play.kotlinlang.org/hands-on/Introduction%20to%20Coroutines%20and%20Channels/"/>
14+
<toc-element id="cancellation-and-timeouts.md"/>
15+
<toc-element id="composing-suspending-functions.md"/>
16+
<toc-element id="coroutine-context-and-dispatchers.md"/>
17+
<toc-element id="flow.md"/>
18+
<toc-element id="channels.md"/>
19+
<toc-element id="exception-handling.md"/>
20+
<toc-element id="shared-mutable-state-and-concurrency.md"/>
21+
<toc-element id="select-expression.md"/>
22+
<toc-element id="debug-coroutines-with-idea.md"/>
23+
<toc-element id="debug-flow-with-idea.md"/>
24+
</chunk>
2525
</product-profile>

docs/project.ihp

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
<ihp version="2.0">
55
<categories src="c.list"/>
6+
<module name="coroutines"/>
67
<topics dir="topics"/>
78
<images dir="images" web-path="/img/kotlin-coroutines/"/>
89
<vars src="v.list"/>

docs/topics/coroutine-context-and-dispatchers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ context of the main `runBlocking` coroutine which runs in the `main` thread.
6565
[Dispatchers.Unconfined] is a special dispatcher that also appears to run in the `main` thread, but it is,
6666
in fact, a different mechanism that is explained later.
6767

68-
The default dispatcher that is used when no other dispatcher is explicitly specified in the scope.
68+
The default dispatcher is used when no other dispatcher is explicitly specified in the scope.
6969
It is represented by [Dispatchers.Default] and uses a shared background pool of threads.
7070

7171
[newSingleThreadContext] creates a thread for the coroutine to run.

docs/topics/coroutines-guide.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ In order to use coroutines as well as follow the examples in this guide, you nee
3434
* [Guide to UI programming with coroutines](https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/coroutines-guide-ui.md)
3535
* [Coroutines design document (KEEP)](https://github.com/Kotlin/KEEP/blob/master/proposals/coroutines.md)
3636
* [Full kotlinx.coroutines API reference](https://kotlin.github.io/kotlinx.coroutines)
37+
* [Best practices for coroutines in Android](https://developer.android.com/kotlin/coroutines/coroutines-best-practices)
38+
* [Additional Android resources for Kotlin coroutines and flow](https://developer.android.com/kotlin/coroutines/additional-resources)

docs/topics/flow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Notice the following differences in the code with the [Flow] from the earlier ex
157157
* Values are _emitted_ from the flow using [emit][FlowCollector.emit] function.
158158
* Values are _collected_ from the flow using [collect][collect] function.
159159

160-
> We can replace [delay] with `Thread.sleep` in the body of `foo`'s `flow { ... }` and see that the main
160+
> We can replace [delay] with `Thread.sleep` in the body of `simple`'s `flow { ... }` and see that the main
161161
> thread is blocked in this case.
162162
>
163163
{type="note"}

kotlinx-coroutines-core/common/src/flow/operators/Transform.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
9393
* Note that initial value should be immutable (or should not be mutated) as it is shared between different collectors.
9494
* For example:
9595
* ```
96-
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
96+
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
9797
* ```
9898
* will produce `[], [1], [1, 2], [1, 2, 3]]`.
9999
*/

0 commit comments

Comments
 (0)