Skip to content

Commit 9a81342

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 4ebc130 + 2fe443b commit 9a81342

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Make sure that you have either `jcenter()` or `mavenCentral()` in the list of re
137137

138138
Core modules of `kotlinx.coroutines` are also available for
139139
[Kotlin/JS](js/README.md) and [Kotlin/Native](native/README.md). If you write
140-
a common code that should get compiled or different platforms, add
140+
a common code that should get compiled for different platforms, add
141141
[`org.jetbrains.kotlinx:kotlinx-coroutines-core-common:<version>`](common/kotlinx-coroutines-core-common/README.md)
142142
to your common code dependencies.
143143

docs/channels.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,16 +342,16 @@ The output of this code is:
342342
<!--- TEST -->
343343

344344
Note, that you can build the same pipeline using
345-
[`buildIterator`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/build-iterator.html)
345+
[`iterator`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/iterator.html)
346346
coroutine builder from the standard library.
347-
Replace `produce` with `buildIterator`, `send` with `yield`, `receive` with `next`,
347+
Replace `produce` with `iterator`, `send` with `yield`, `receive` with `next`,
348348
`ReceiveChannel` with `Iterator`, and get rid of the coroutine scope. You will not need `runBlocking` either.
349349
However, the benefit of a pipeline that uses channels as shown above is that it can actually use
350350
multiple CPU cores if you run it in [Dispatchers.Default] context.
351351

352352
Anyway, this is an extremely impractical way to find prime numbers. In practice, pipelines do involve some
353353
other suspending invocations (like asynchronous calls to remote services) and these pipelines cannot be
354-
built using `buildSequence`/`buildIterator`, because they do not allow arbitrary suspension, unlike
354+
built using `sequence`/`iterator`, because they do not allow arbitrary suspension, unlike
355355
`produce`, which is fully asynchronous.
356356

357357
### Fan-out

docs/exception-handling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ Caught original java.io.IOException
360360
As we have studied before, cancellation is a bidirectional relationship propagating through the whole
361361
coroutines hierarchy. But what if unidirectional cancellation is required?
362362

363-
Good example of such requirement can be a UI component with the job defined in its scope. If any of UI's child task
364-
has failed, it is not always necessary to cancel (effectively kill) the whole UI component,
365-
but if UI component is destroyed (and its job is cancelled), then it is necessary to fail all children jobs as their result is no longer required.
363+
A good example of such a requirement is a UI component with the job defined in its scope. If any of the UI's child tasks
364+
have failed, it is not always necessary to cancel (effectively kill) the whole UI component,
365+
but if UI component is destroyed (and its job is cancelled), then it is necessary to fail all child jobs as their results are no longer required.
366366

367367
Another example is a server process that spawns several children jobs and needs to _supervise_
368368
their execution, tracking their failures and restarting just those children jobs that had failed.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import kotlin.jvm.*
1313
* when all deferred computations are complete or resumes with the first thrown exception if any of computations
1414
* complete exceptionally including cancellation.
1515
*
16-
* This function is **not** equivalent to `deferreds.map { it.await() }` which fails only when when it sequentially
17-
* gets to wait the failing deferred, while this `awaitAll` fails immediately as soon as any of the deferreds fail.
16+
* This function is **not** equivalent to `deferreds.map { it.await() }` which fails only when it sequentially
17+
* gets to wait for the failing deferred, while this `awaitAll` fails immediately as soon as any of the deferreds fail.
1818
*
1919
* This suspending function is cancellable.
2020
* If the [Job] of the current coroutine is cancelled or completed while this suspending function is waiting,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import kotlin.coroutines.*
1515
* This function should not be used from coroutine. It is designed to bridge regular blocking code
1616
* to libraries that are written in suspending style, to be used in `main` functions and in tests.
1717
*
18-
* The default [CoroutineDispatcher] for this builder in an internal implementation of event loop that processes continuations
18+
* The default [CoroutineDispatcher] for this builder is an internal implementation of event loop that processes continuations
1919
* in this blocked thread until the completion of this coroutine.
2020
* See [CoroutineDispatcher] for the other implementations that are provided by `kotlinx.coroutines`.
2121
*

license/NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=========================================================================
22
== NOTICE file corresponding to the section 4 d of ==
33
== the Apache License, Version 2.0, ==
4-
== in this case for the kotlix.coroutines library. ==
4+
== in this case for the kotlinx.coroutines library. ==
55
=========================================================================
66

77
kotlinx.coroutines library.

0 commit comments

Comments
 (0)