Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qwwdfsad committed Aug 26, 2021
2 parents 3dcc349 + d281a7c commit d3ead6f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ normally and is only used by the debugger. To exclude it at no loss of functiona
`android` block in your Gradle file for the application subproject:
```groovy
packagingOptions {
exclude "DebugProbesKt.bin"
resources.excludes += "DebugProbesKt.bin"
}
```

Expand Down
30 changes: 15 additions & 15 deletions docs/kc.tree
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
name="Kotlin coroutines"
start-page="coroutines-guide.md">

<toc-element id="coroutines-guide.md"/>
<toc-element id="async-programming.md"/>
<toc-element id="coroutines-basics.md" accepts-web-file-names="basics.html,coroutines-basic-jvm.html"/>
<toc-element toc-title="Intro to coroutines and channels – hands-on tutorial" href="https://play.kotlinlang.org/hands-on/Introduction%20to%20Coroutines%20and%20Channels/"/>
<toc-element id="cancellation-and-timeouts.md"/>
<toc-element id="composing-suspending-functions.md"/>
<toc-element id="coroutine-context-and-dispatchers.md"/>
<toc-element id="flow.md"/>
<toc-element id="channels.md"/>
<toc-element id="exception-handling.md"/>
<toc-element id="shared-mutable-state-and-concurrency.md"/>
<toc-element id="select-expression.md"/>
<toc-element id="debug-coroutines-with-idea.md"/>
<toc-element id="debug-flow-with-idea.md"/>

<chunk include-id="coroutines">
<toc-element id="coroutines-guide.md"/>
<toc-element id="coroutines-basics.md" accepts-web-file-names="basics.html,coroutines-basic-jvm.html"/>
<toc-element toc-title="Intro to coroutines and channels – hands-on tutorial" href="https://play.kotlinlang.org/hands-on/Introduction%20to%20Coroutines%20and%20Channels/"/>
<toc-element id="cancellation-and-timeouts.md"/>
<toc-element id="composing-suspending-functions.md"/>
<toc-element id="coroutine-context-and-dispatchers.md"/>
<toc-element id="flow.md"/>
<toc-element id="channels.md"/>
<toc-element id="exception-handling.md"/>
<toc-element id="shared-mutable-state-and-concurrency.md"/>
<toc-element id="select-expression.md"/>
<toc-element id="debug-coroutines-with-idea.md"/>
<toc-element id="debug-flow-with-idea.md"/>
</chunk>
</product-profile>
1 change: 1 addition & 0 deletions docs/project.ihp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<ihp version="2.0">
<categories src="c.list"/>
<module name="coroutines"/>
<topics dir="topics"/>
<images dir="images" web-path="/img/kotlin-coroutines/"/>
<vars src="v.list"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/coroutine-context-and-dispatchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ context of the main `runBlocking` coroutine which runs in the `main` thread.
[Dispatchers.Unconfined] is a special dispatcher that also appears to run in the `main` thread, but it is,
in fact, a different mechanism that is explained later.

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

[newSingleThreadContext] creates a thread for the coroutine to run.
Expand Down
2 changes: 2 additions & 0 deletions docs/topics/coroutines-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ In order to use coroutines as well as follow the examples in this guide, you nee
* [Guide to UI programming with coroutines](https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/coroutines-guide-ui.md)
* [Coroutines design document (KEEP)](https://github.com/Kotlin/KEEP/blob/master/proposals/coroutines.md)
* [Full kotlinx.coroutines API reference](https://kotlin.github.io/kotlinx.coroutines)
* [Best practices for coroutines in Android](https://developer.android.com/kotlin/coroutines/coroutines-best-practices)
* [Additional Android resources for Kotlin coroutines and flow](https://developer.android.com/kotlin/coroutines/additional-resources)
2 changes: 1 addition & 1 deletion docs/topics/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Notice the following differences in the code with the [Flow] from the earlier ex
* Values are _emitted_ from the flow using [emit][FlowCollector.emit] function.
* Values are _collected_ from the flow using [collect][collect] function.

> We can replace [delay] with `Thread.sleep` in the body of `foo`'s `flow { ... }` and see that the main
> We can replace [delay] with `Thread.sleep` in the body of `simple`'s `flow { ... }` and see that the main
> thread is blocked in this case.
>
{type="note"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
* Note that initial value should be immutable (or should not be mutated) as it is shared between different collectors.
* For example:
* ```
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
* ```
* will produce `[], [1], [1, 2], [1, 2, 3]]`.
*/
Expand Down

0 comments on commit d3ead6f

Please sign in to comment.