Skip to content

Commit 84b24bd

Browse files
committed
Merge branch 'master' into develop
# Conflicts: # reactive/kotlinx-coroutines-reactive/src/Channel.kt # reactive/kotlinx-coroutines-rx2/src/RxChannel.kt
2 parents 946e578 + 7f0da42 commit 84b24bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+146
-1960
lines changed

CHANGES.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change log for kotlinx.coroutines
22

3+
## Version 1.3.2
4+
5+
This is a maintenance release that does not include any new features or bug fixes.
6+
7+
* Reactive integrations for `Flow` are promoted to stable API.
8+
* Obsolete reactive API is deprecated.
9+
* Deprecation level for API deprecated in 1.3.0 is increased.
10+
* Various documentation improvements.
11+
312
## Version 1.3.1
413

514
This is a minor update with various fixes:

README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
44
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
5-
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.3.1) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.3.1)
5+
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.3.2) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.3.2)
66

77
Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
88
This is a companion version for Kotlin `1.3.50` release.
@@ -62,7 +62,6 @@ suspend fun main() = coroutineScope {
6262
* Guides and manuals:
6363
* [Guide to kotlinx.coroutines by example](https://kotlinlang.org/docs/reference/coroutines/coroutines-guide.html) (**read it first**)
6464
* [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)
65-
* [Guide to reactive streams with coroutines](reactive/coroutines-guide-reactive.md)
6665
* [Debugging capabilities in kotlinx.coroutines](docs/debugging.md)
6766
* [Compatibility policy and experimental annotations](docs/compatibility.md)
6867
* [Change log for kotlinx.coroutines](CHANGES.md)
@@ -83,7 +82,7 @@ Add dependencies (you can also add other modules that you need):
8382
<dependency>
8483
<groupId>org.jetbrains.kotlinx</groupId>
8584
<artifactId>kotlinx-coroutines-core</artifactId>
86-
<version>1.3.1</version>
85+
<version>1.3.2</version>
8786
</dependency>
8887
```
8988

@@ -101,7 +100,7 @@ Add dependencies (you can also add other modules that you need):
101100

102101
```groovy
103102
dependencies {
104-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1'
103+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
105104
}
106105
```
107106

@@ -127,7 +126,7 @@ Add dependencies (you can also add other modules that you need):
127126

128127
```groovy
129128
dependencies {
130-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1")
129+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2")
131130
}
132131
```
133132

@@ -146,7 +145,7 @@ Make sure that you have either `jcenter()` or `mavenCentral()` in the list of re
146145
Core modules of `kotlinx.coroutines` are also available for
147146
[Kotlin/JS](#js) and [Kotlin/Native](#native).
148147
In common code that should get compiled for different platforms, add dependency to
149-
[`kotlinx-coroutines-core-common`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.3.1/jar)
148+
[`kotlinx-coroutines-core-common`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.3.2/jar)
150149
(follow the link to get the dependency declaration snippet).
151150

152151
### Android
@@ -155,7 +154,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
155154
module as dependency when using `kotlinx.coroutines` on Android:
156155

157156
```groovy
158-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1'
157+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
159158
```
160159

161160
This gives you access to Android [Dispatchers.Main]
@@ -174,15 +173,15 @@ R8 is a replacement for ProGuard in Android ecosystem, it is enabled by default
174173
### JS
175174

176175
[Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) version of `kotlinx.coroutines` is published as
177-
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.3.1/jar)
176+
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.3.2/jar)
178177
(follow the link to get the dependency declaration snippet).
179178

180179
You can also use [`kotlinx-coroutines-core`](https://www.npmjs.com/package/kotlinx-coroutines-core) package via NPM.
181180

182181
### Native
183182

184183
[Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html) version of `kotlinx.coroutines` is published as
185-
[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.3.1/jar)
184+
[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.3.2/jar)
186185
(follow the link to get the dependency declaration snippet).
187186

188187
Only single-threaded code (JS-style) on Kotlin/Native is currently supported.

binary-compatibility-validator/resources/api.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
module.roots=/ integration reactive ui
66
module.marker=build.gradle
7-
module.ignore=kotlinx-coroutines-rx-example stdlib-stubs benchmarks knit binary-compatibility-validator site publication-validator kotlinx-coroutines-bom
7+
module.ignore=stdlib-stubs benchmarks knit binary-compatibility-validator site publication-validator kotlinx-coroutines-bom
88

99
packages.internal=kotlinx.coroutines.internal

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def coreModule = "kotlinx-coroutines-core"
1111
def sourceless = ['kotlinx.coroutines', 'site', 'kotlinx-coroutines-bom']
1212
def internal = ['kotlinx.coroutines', 'site', 'benchmarks', 'knit', 'js-stub', 'stdlib-stubs', 'binary-compatibility-validator']
1313
// Not published
14-
def unpublished = internal + ['kotlinx-coroutines-rx-example', 'example-frontend-js', 'android-unit-tests']
14+
def unpublished = internal + ['example-frontend-js', 'android-unit-tests']
1515

1616
static def platformOf(project) {
1717
def name = project.name

coroutines-guide.md

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The main coroutines guide has moved to the [docs folder](docs/coroutines-guide.m
7979
* <a name='upstream-exceptions-only'></a>[Upstream exceptions only](docs/flow.md#upstream-exceptions-only)
8080
* <a name='imperative-versus-declarative'></a>[Imperative versus declarative](docs/flow.md#imperative-versus-declarative)
8181
* <a name='launching-flow'></a>[Launching flow](docs/flow.md#launching-flow)
82+
* <a name='flow-and-reactive-streams'></a>[Flow and Reactive Streams](docs/flow.md#flow-and-reactive-streams)
8283
<!--- TOC_REF docs/channels.md -->
8384
* <a name='channels'></a>[Channels](docs/channels.md#channels)
8485
* <a name='channel-basics'></a>[Channel basics](docs/channels.md#channel-basics)

docs/coroutines-guide.md

-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ In order to use coroutines as well as follow the examples in this guide, you nee
2828
## Additional references
2929

3030
* [Guide to UI programming with coroutines](../ui/coroutines-guide-ui.md)
31-
* [Guide to reactive streams with coroutines](../reactive/coroutines-guide-reactive.md)
3231
* [Coroutines design document (KEEP)](https://github.com/Kotlin/kotlin-coroutines/blob/master/kotlin-coroutines-informal.md)
3332
* [Full kotlinx.coroutines API reference](https://kotlin.github.io/kotlinx.coroutines)

docs/flow.md

+13
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class FlowGuideTest {
5858
* [Upstream exceptions only](#upstream-exceptions-only)
5959
* [Imperative versus declarative](#imperative-versus-declarative)
6060
* [Launching flow](#launching-flow)
61+
* [Flow and Reactive Streams](#flow-and-reactive-streams)
6162

6263
<!--- END_TOC -->
6364

@@ -1794,6 +1795,18 @@ as cancellation and structured concurrency serve this purpose.
17941795
Note that [launchIn] also returns a [Job], which can be used to [cancel][Job.cancel] the corresponding flow collection
17951796
coroutine only without cancelling the whole scope or to [join][Job.join] it.
17961797

1798+
### Flow and Reactive Streams
1799+
1800+
For those who are familiar with [Reactive Streams](https://www.reactive-streams.org/) or reactive frameworks such as RxJava and project Reactor,
1801+
design of the Flow may look very familiar.
1802+
1803+
Indeed, its design was inspired by Reactive Streams and its various implementations. But Flow main goal is to have as simple design as possible,
1804+
be Kotlin and suspension friendly and respect structured concurrency. Achieving this goal would be impossible without reactive pioneers and their tremendous work. You can read the complete story in [Reactive Streams and Kotlin Flows](https://medium.com/@elizarov/reactive-streams-and-kotlin-flows-bfd12772cda4) article.
1805+
1806+
While being different, conceptually, Flow *is* a reactive stream and it is possible to convert it to the reactive (spec and TCK compliant) Publisher and vice versa.
1807+
Such converters are provided by `kotlinx.coroutines` out-of-the-box and can be found in corresponding reactive modules (`kotlinx-coroutines-reactive` for Reactive Streams, `kotlinx-coroutines-reactor` for Project Reactor and `kotlinx-coroutines-rx2` for RxJava2).
1808+
Integration modules include conversions from and to `Flow`, integration with Reactor's `Context` and suspension-friendly ways to work with various reactive entities.
1809+
17971810
<!-- stdlib references -->
17981811

17991812
[collections]: https://kotlinlang.org/docs/reference/collections-overview.html

gradle.properties

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

55
# Kotlin
6-
version=1.3.1-SNAPSHOT
6+
version=1.3.2-SNAPSHOT
77
group=org.jetbrains.kotlinx
88
kotlin_version=1.3.50
99

kotlinx-coroutines-core/common/src/Dispatchers.common.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public expect object Dispatchers {
5454
*
5555
* For example, the following code:
5656
* ```
57-
* withContext(Dispatcher.Unconfined) {
57+
* withContext(Dispatchers.Unconfined) {
5858
* println(1)
59-
* withContext(Dispatcher.Unconfined) { // Nested unconfined
59+
* withContext(Dispatchers.Unconfined) { // Nested unconfined
6060
* println(2)
6161
* }
6262
* println(3)

kotlinx-coroutines-core/jvm/src/Dispatchers.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ public actual object Dispatchers {
7171
*
7272
* For example, the following code:
7373
* ```
74-
* withContext(Dispatcher.Unconfined) {
74+
* withContext(Dispatchers.Unconfined) {
7575
* println(1)
76-
* withContext(Dispatcher.Unconfined) { // Nested unconfined
76+
* withContext(Dispatchers.Unconfined) { // Nested unconfined
7777
* println(2)
7878
* }
7979
* println(3)

kotlinx-coroutines-debug/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ of coroutines hierarchy referenced by a [Job] or [CoroutineScope] instances usin
1818
Add `kotlinx-coroutines-debug` to your project test dependencies:
1919
```
2020
dependencies {
21-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.1'
21+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.2'
2222
}
2323
```
2424

@@ -56,7 +56,7 @@ stacktraces will be dumped to the console.
5656
### Using as JVM agent
5757

5858
It is possible to use this module as a standalone JVM agent to enable debug probes on the application startup.
59-
You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.3.1.jar`.
59+
You can run your application with an additional argument: `-javaagent:kotlinx-coroutines-debug-1.3.2.jar`.
6060
Additionally, on Linux and Mac OS X you can use `kill -5 $pid` command in order to force your application to print all alive coroutines.
6161

6262

kotlinx-coroutines-test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This package provides testing utilities for effectively testing coroutines.
99
Add `kotlinx-coroutines-test` to your project test dependencies:
1010
```
1111
dependencies {
12-
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.1'
12+
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.2'
1313
}
1414
```
1515

0 commit comments

Comments
 (0)