Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	gradle.properties
  • Loading branch information
qwwdfsad committed Apr 25, 2021
2 parents 47a063c + f19ae19 commit 3468479
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
3 changes: 1 addition & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@

* Fixed the problem that prevented implementation via delegation for `Job` interface (#2423)
* Fixed incorrect ProGuard rules that allowed shrinking volatile felds (#1564)
* Fixed `await/`asDeferred` for `MinimalState` implementations in jdk8 module (#2456)
* Fixed `await`/`asDeferred` for `MinimalStage` implementations in jdk8 module (#2456)
* Fixed bug when `onUndeliveredElement` wasn't called for unlimited channels (#2435)
* Fixed a bug when `ListenableFuture.isCancelled` returned from `asListenableFuture` could have thrown an exception, thanks to @vadimsemenov (#2421)
* Coroutine in `callbackFlow` and `produce` is properly cancelled when the channel was closed separately (#2506)


## Version 1.4.2

* Fixed `StackOverflowError` in `Job.toString` when `Job` is observed in its intermediate state (#2371).
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.4.3) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.3)
[![Download](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.4.3)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.4.3/pom)
[![Kotlin](https://img.shields.io/badge/kotlin-1.4.30-blue.svg?logo=kotlin)](http:https://kotlinlang.org)
[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/)

Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
This is a companion version for Kotlin `1.4.30` release.
This is a companion version for the Kotlin `1.4.30` release.

```kotlin
suspend fun main() = coroutineScope {
Expand Down Expand Up @@ -144,16 +144,16 @@ Make sure that you have `mavenCentral()` in the list of repositories.
### Android

Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
module as dependency when using `kotlinx.coroutines` on Android:
module as a dependency when using `kotlinx.coroutines` on Android:

```groovy
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
```

This gives you access to Android [Dispatchers.Main]
coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this
exception is logged before crashing Android application, similarly to the way uncaught exceptions in
threads are handled by Android runtime.
This gives you access to the Android [Dispatchers.Main]
coroutine dispatcher and also makes sure that in case of a crashed coroutine with an unhandled exception that
this exception is logged before crashing the Android application, similarly to the way uncaught exceptions in
threads are handled by the Android runtime.

#### R8 and ProGuard

Expand All @@ -164,7 +164,7 @@ For more details see ["Optimization" section for Android](ui/kotlinx-coroutines-

The `kotlinx-coroutines-core` artifact contains a resource file that is not required for the coroutines to operate
normally and is only used by the debugger. To exclude it at no loss of functionality, add the following snippet to the
`android` block in your gradle file for the application subproject:
`android` block in your Gradle file for the application subproject:
```groovy
packagingOptions {
exclude "DebugProbesKt.bin"
Expand All @@ -176,7 +176,7 @@ packagingOptions {
Core modules of `kotlinx.coroutines` are also available for
[Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) and [Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html).

In common code that should get compiled for different platforms, you can add dependency to `kotlinx-coroutines-core` right to the `commonMain` source set:
In common code that should get compiled for different platforms, you can add a dependency to `kotlinx-coroutines-core` right to the `commonMain` source set:
```groovy
commonMain {
dependencies {
Expand All @@ -185,7 +185,7 @@ commonMain {
}
```

No more additional dependencies is needed, platform-specific artifacts will be resolved automatically via Gradle metadata available since Gradle 5.3.
No more additional dependencies are needed, platform-specific artifacts will be resolved automatically via Gradle metadata available since Gradle 5.3.

Platform-specific dependencies are recommended to be used only for non-multiplatform projects that are compiled only for target platform.

Expand All @@ -203,11 +203,11 @@ the target Kotlin/Native platform. [List of currently supported targets](https:/


Only single-threaded code (JS-style) on Kotlin/Native is supported in stable versions.
Additionally, special `-native-mt` version is released on a regular basis, for the state of multi-threaded coroutines support
Additionally, a special `-native-mt` version is released on a regular basis, for the state of multi-threaded coroutines support
please follow the [corresponding issue](https://github.com/Kotlin/kotlinx.coroutines/issues/462) for the additional details.

Since Kotlin/Native does not generally provide binary compatibility between versions,
you should use the same version of Kotlin/Native compiler as was used to build `kotlinx.coroutines`.
you should use the same version of the Kotlin/Native compiler as was used to build `kotlinx.coroutines`.

## Building and Contributing

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To release new `<version>` of `kotlinx-coroutines`:
7. Commit updated files to a new version branch:<br>
`git commit -a -m "Version <version>"`

8. Push new version into the branch:<br>
8. Push the new version into the branch:<br>
`git push -u origin version-<version>`

9. Create Pull-Request on GitHub from `version-<version>` branch into `master`:
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/debug-coroutines-with-idea.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The tutorial assumes you have prior knowledge of the [coroutines](coroutines-gui
* Use the [`runBlocking()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html) block to wrap a coroutine.
* Use the [`async()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/async.html) function to create coroutines that compute deferred values `a` and `b`.
* Use the [`await()`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-deferred/await.html) function to await the computation result.
* Use the [`println()`](https://kotlinlang.org//api/latest/jvm/stdlib/stdlib/kotlin.io/println.html) function to print computing status and the result of multiplication to the output.
* Use the [`println()`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/println.html) function to print computing status and the result of multiplication to the output.

```kotlin
import kotlinx.coroutines.*
Expand Down Expand Up @@ -79,4 +79,4 @@ The tutorial assumes you have prior knowledge of the [coroutines](coroutines-gui
* The second coroutine has computed its value and disappeared.
* The third coroutine is calculating the value of `b` – it has the **RUNNING** status.

Using IntelliJ IDEA debugger, you can dig deeper into each coroutine to debug your code.
Using IntelliJ IDEA debugger, you can dig deeper into each coroutine to debug your code.
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/common/src/flow/StateFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import kotlin.native.concurrent.*
* neither does a coroutine started by the [Flow.launchIn] function. An active collector of a state flow is called a _subscriber_.
*
* A [mutable state flow][MutableStateFlow] is created using `MutableStateFlow(value)` constructor function with
* the initial value. The value of mutable state flow can be updated by setting its [value] property.
* the initial value. The value of mutable state flow can be updated by setting its [value] property.
* Updates to the [value] are always [conflated][Flow.conflate]. So a slow collector skips fast updates,
* but always collects the most recently emitted value.
*
Expand Down
7 changes: 6 additions & 1 deletion site/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

#
# Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
#

# Abort on first error
set -e

Expand Down Expand Up @@ -47,7 +51,8 @@ git rm `find . -type f -not -name '*.html' -not -name '.git'` > /dev/null
echo "Redirecting experimental pages"
git_add=()
git_rm=()
for file in `find . -type f -name '*.html'` ; do
`find . -type f -name '*.html'` | while read file
do
match=nothing_is_found
if [[ $file =~ \.experimental ]] ; then
match="${file//\.experimental/}"
Expand Down

0 comments on commit 3468479

Please sign in to comment.