Skip to content

Commit e9224ac

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 31b23e8 + 75f634c commit e9224ac

File tree

12 files changed

+20
-25
lines changed

12 files changed

+20
-25
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,13 @@ coroutine dispatcher and also makes sure that in case of crashed coroutine with
151151
exception is logged before crashing Android application, similarly to the way uncaught exceptions in
152152
threads are handled by Android runtime.
153153

154-
### R8 and ProGuard
154+
#### R8 and ProGuard
155155

156-
If you are using R8 or ProGuard add the options from [coroutines.pro](core/kotlinx-coroutines-core/resources/META-INF/proguard/coroutines.pro) file to your rules.
156+
For R8 no actions required, it will take obfuscation rules from the jar.
157+
158+
For Proguard you need to add options from [coroutines.pro](core/kotlinx-coroutines-core/resources/META-INF/proguard/coroutines.pro) to your rules manually.
159+
160+
R8 is a replacement for ProGuard in Android ecosystem, it is enabled by default since Android gradle plugin 3.3.0-beta.
157161

158162
## Building
159163

core/kotlinx-coroutines-core/test/guide/example-channel-04.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ fun main() = runBlocking {
1818
//sampleEnd
1919
}
2020

21-
fun CoroutineScope.produceSquares(): ReceiveChannel<Int> = produce {
22-
for (x in 1..5) send(x * x)
23-
}
24-
2521
fun CoroutineScope.produceNumbers() = produce<Int> {
2622
var x = 1
2723
while (true) send(x++) // infinite stream of integers starting from 1
2824
}
25+
2926
fun CoroutineScope.square(numbers: ReceiveChannel<Int>): ReceiveChannel<Int> = produce {
3027
for (x in numbers) send(x * x)
3128
}

docs/basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.junit.Test
1616
class BasicsGuideTest {
1717
-->
1818

19-
## Table of contents
19+
**Table of contents**
2020

2121
<!--- TOC -->
2222

@@ -89,7 +89,7 @@ coroutine and it can be only used from a coroutine.
8989
### Bridging blocking and non-blocking worlds
9090

9191
The first example mixes _non-blocking_ `delay(...)` and _blocking_ `Thread.sleep(...)` in the same code.
92-
It is easy to get lost which one is blocking and which one is not.
92+
It is easy to lose track of which one is blocking and which one is not.
9393
Let's be explicit about blocking using [runBlocking] coroutine builder:
9494

9595
<div class="sample" markdown="1" theme="idea" data-min-compiler-version="1.3">

docs/cancellation-and-timeouts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.junit.Test
1515
1616
class CancellationTimeOutsGuideTest {
1717
-->
18-
## Table of contents
18+
**Table of contents**
1919

2020
<!--- TOC -->
2121

@@ -138,7 +138,7 @@ main: Now I can quit.
138138

139139
There are two approaches to making computation code cancellable. The first one is to periodically
140140
invoke a suspending function that checks for cancellation. There is a [yield] function that is a good choice for that purpose.
141-
The other one is to explicitly check the cancellation status. Let us try the later approach.
141+
The other one is to explicitly check the cancellation status. Let us try the latter approach.
142142

143143
Replace `while (i < 5)` in the previous example with `while (isActive)` and rerun it.
144144

docs/channels.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.junit.Test
1515
1616
class ChannelsGuideTest {
1717
-->
18-
## Table of contents
18+
**Table of contents**
1919

2020
<!--- TOC -->
2121

@@ -219,14 +219,11 @@ fun main() = runBlocking {
219219
//sampleEnd
220220
}
221221

222-
fun CoroutineScope.produceSquares(): ReceiveChannel<Int> = produce {
223-
for (x in 1..5) send(x * x)
224-
}
225-
226222
fun CoroutineScope.produceNumbers() = produce<Int> {
227223
var x = 1
228224
while (true) send(x++) // infinite stream of integers starting from 1
229225
}
226+
230227
fun CoroutineScope.square(numbers: ReceiveChannel<Int>): ReceiveChannel<Int> = produce {
231228
for (x in numbers) send(x * x)
232229
}

docs/composing-suspending-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.junit.Test
1616
class ComposingGuideTest {
1717
-->
1818

19-
## Table of contents
19+
**Table of contents**
2020

2121
<!--- TOC -->
2222

docs/coroutine-context-and-dispatchers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.junit.Test
1616
class DispatchersGuideTest {
1717
-->
1818

19-
## Table of contents
19+
**Table of contents**
2020

2121
<!--- TOC -->
2222

docs/exception-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.junit.Test
1515
1616
class ExceptionsGuideTest {
1717
-->
18-
## Table of contents
18+
**Table of contents**
1919

2020
<!--- TOC -->
2121

docs/select-expression.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SelectGuideTest {
1717
-->
1818

1919

20-
## Table of contents
20+
**Table of contents**
2121

2222
<!--- TOC -->
2323

docs/shared-mutable-state-and-concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.junit.Test
1515
1616
class SharedStateGuideTest {
1717
-->
18-
## Table of contents
18+
**Table of contents**
1919

2020
<!--- TOC -->
2121

native/kotlinx-coroutines-core-native/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Coroutine builder functions:
99
| [launch] | [Job] | [CoroutineScope] | Launches coroutine that does not have any result
1010
| [async] | [Deferred] | [CoroutineScope] | Returns a single value with the future result
1111
| [produce][kotlinx.coroutines.channels.produce] | [ReceiveChannel][kotlinx.coroutines.channels.ReceiveChannel] | [ProducerScope][kotlinx.coroutines.channels.ProducerScope] | Produces a stream of elements
12-
| [actor][kotlinx.coroutines.channels.actor] | [SendChannel][kotlinx.coroutines.channels.SendChannel] | [ActorScope][kotlinx.coroutines.channels.ActorScope] | Processes a stream of messages
1312
| [runBlocking] | `T` | [CoroutineScope] | Blocks the thread while the coroutine runs
1413

1514
Coroutine dispatchers implementing [CoroutineDispatcher]:
@@ -96,12 +95,10 @@ helper function. [NonCancellable] job object is provided to suppress cancellatio
9695
[kotlinx.coroutines.channels.produce]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/produce.html
9796
[kotlinx.coroutines.channels.ReceiveChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/index.html
9897
[kotlinx.coroutines.channels.ProducerScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-producer-scope/index.html
99-
[kotlinx.coroutines.channels.actor]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/actor.html
100-
[kotlinx.coroutines.channels.SendChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/index.html
101-
[kotlinx.coroutines.channels.ActorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-actor-scope/index.html
10298
[kotlinx.coroutines.channels.Channel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-channel/index.html
10399
[kotlinx.coroutines.channels.SendChannel.send]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/send.html
104100
[kotlinx.coroutines.channels.ReceiveChannel.receive]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/receive.html
101+
[kotlinx.coroutines.channels.SendChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/index.html
105102
[kotlinx.coroutines.channels.SendChannel.onSend]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/on-send.html
106103
[kotlinx.coroutines.channels.SendChannel.offer]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/offer.html
107104
[kotlinx.coroutines.channels.ReceiveChannel.onReceive]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/on-receive.html

ui/coroutines-guide-ui.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Add dependencies on `kotlinx-coroutines-android` module to the `dependencies { .
165165
`app/build.gradle` file:
166166

167167
```groovy
168-
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.1"
168+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.1"
169169
```
170170

171171
You can clone [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) project from GitHub onto your

0 commit comments

Comments
 (0)