Skip to content

Commit 46cc6aa

Browse files
committed
Merge branch 'master' into develop
2 parents c982456 + 5768067 commit 46cc6aa

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/_nav.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
- md: basics.md
2-
url: basics.html
3-
title: Basics
41
- md: coroutines-guide.md
52
url: coroutines-guide.html
63
title: Coroutines Guide
4+
- md: basics.md
5+
url: basics.html
6+
title: Basics
77
- md: cancellation-and-timeouts.md
88
url: cancellation-and-timeouts.html
99
title: Cancellation and Timeouts

docs/channels.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ This is a part of _producer-consumer_ pattern that is often found in concurrent
133133
You could abstract such a producer into a function that takes channel as its parameter, but this goes contrary
134134
to common sense that results must be returned from functions.
135135

136-
There is a convenience coroutine builder named [produce] that makes it easy to do it right on producer side,
136+
There is a convenient coroutine builder named [produce] that makes it easy to do it right on producer side,
137137
and an extension function [consumeEach], that replaces a `for` loop on the consumer side:
138138

139139
<div class="sample" markdown="1" theme="idea" data-highlight-only>
@@ -179,7 +179,7 @@ fun CoroutineScope.produceNumbers() = produce<Int> {
179179
</div>
180180

181181
And another coroutine or coroutines are consuming that stream, doing some processing, and producing some other results.
182-
In the below example the numbers are just squared:
182+
In the example below, the numbers are just squared:
183183

184184
<div class="sample" markdown="1" theme="idea" data-highlight-only>
185185

@@ -219,7 +219,7 @@ Done!
219219
-->
220220

221221
> All functions that create coroutines are defined as extensions on [CoroutineScope],
222-
so that we can rely on [structured concurrency](https://github.com/Kotlin/kotlinx.coroutineskotlinx.coroutines/blob/master/docs/composing-suspending-functions.md#structured-concurrency-with-async) to make
222+
so that we can rely on [structured concurrency](https://kotlinlang.org/docs/reference/coroutines/composing-suspending-functions.html#structured-concurrency-with-async) to make
223223
sure that we don't have lingering global coroutines in our application.
224224

225225
### Prime numbers with pipeline

docs/coroutine-context-and-dispatchers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Coroutine context includes a _coroutine dispatcher_ (see [CoroutineDispatcher])
5252
the corresponding coroutine uses for its execution. Coroutine dispatcher can confine coroutine execution
5353
to a specific thread, dispatch it to a thread pool, or let it run unconfined.
5454

55-
All coroutines builders like [launch] and [async] accept an optional
55+
All coroutine builders like [launch] and [async] accept an optional
5656
[CoroutineContext](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines.experimental/-coroutine-context/)
5757
parameter that can be used to explicitly specify the dispatcher for new coroutine and other context elements.
5858

@@ -594,7 +594,7 @@ are not bound to any particular thread, it is hard to achieve it manually withou
594594

595595
For [`ThreadLocal`](https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html),
596596
[asContextElement] extension function is here for the rescue. It creates an additional context element,
597-
which keep the value of the given `ThreadLocal` and restores it every time the coroutine switches its context.
597+
which keeps the value of the given `ThreadLocal` and restores it every time the coroutine switches its context.
598598

599599
It is easy to demonstrate it in action:
600600

docs/exception-handling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ coroutine throw an exception?
4747

4848
Coroutine builders come in two flavors: propagating exceptions automatically ([launch] and [actor]) or
4949
exposing them to users ([async] and [produce]).
50-
The former treat exceptions as unhandled, similar to Java's `Thread.uncaughExceptionHandler`,
50+
The former treat exceptions as unhandled, similar to Java's `Thread.uncaughtExceptionHandler`,
5151
while the latter are relying on the user to consume the final
5252
exception, for example via [await][Deferred.await] or [receive][ReceiveChannel.receive]
5353
([produce] and [receive][ReceiveChannel.receive] are covered later in [Channels](https://github.com/Kotlin/kotlinx.coroutines/blob/master/docs/channels.md) section).
@@ -254,7 +254,7 @@ So, additional exceptions are suppressed.
254254

255255
> One of the solutions would have been to report each exception separately,
256256
but then [Deferred.await] should have had the same mechanism to avoid behavioural inconsistency and this
257-
would cause implementation details of a coroutines (whether it had delegate parts of its work to its children or not)
257+
would cause implementation details of a coroutines (whether it had delegated parts of its work to its children or not)
258258
to leak to its exception handler.
259259

260260
<!--- INCLUDE

0 commit comments

Comments
 (0)