Skip to content

Commit 39f92ca

Browse files
Inegoelizarov
authored andcommitted
Fix typos (mostly article usage)
1 parent ebe519a commit 39f92ca

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ import kotlin.jvm.*
3232
* the coroutine [Job] is created in _new_ state. It can be explicitly started with [start][Job.start] function
3333
* and will be started implicitly on the first invocation of [join][Job.join].
3434
*
35-
* Uncaught exceptions in this coroutine cancel parent job in the context by default
35+
* Uncaught exceptions in this coroutine cancel the parent job in the context by default
3636
* (unless [CoroutineExceptionHandler] is explicitly specified), which means that when `launch` is used with
37-
* the context of another coroutine, then any uncaught exception leads to the cancellation of parent coroutine.
37+
* the context of another coroutine, then any uncaught exception leads to the cancellation of the parent coroutine.
3838
*
39-
* See [newCoroutineContext] for a description of debugging facilities that are available for newly created coroutine.
39+
* See [newCoroutineContext] for a description of debugging facilities that are available for a newly created coroutine.
4040
*
4141
* @param context additional to [CoroutineScope.coroutineContext] context of the coroutine.
4242
* @param start coroutine start option. The default value is [CoroutineStart.DEFAULT].

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ import kotlin.coroutines.*
2020
*/
2121
public enum class CoroutineStart {
2222
/**
23-
* Default -- immediately schedules coroutine for execution according to its context.
23+
* Default -- immediately schedules the coroutine for execution according to its context.
2424
*
2525
* If the [CoroutineDispatcher] of the coroutine context returns `true` from [CoroutineDispatcher.isDispatchNeeded]
2626
* function as most dispatchers do, then the coroutine code is dispatched for execution later, while the code that
2727
* invoked the coroutine builder continues execution.
2828
*
2929
* Note that [Dispatchers.Unconfined] always returns `false` from its [CoroutineDispatcher.isDispatchNeeded]
30-
* function, so starting coroutine with [Dispatchers.Unconfined] by [DEFAULT] is the same as using [UNDISPATCHED].
30+
* function, so starting a coroutine with [Dispatchers.Unconfined] by [DEFAULT] is the same as using [UNDISPATCHED].
3131
*
3232
* If coroutine [Job] is cancelled before it even had a chance to start executing, then it will not start its
3333
* execution at all, but will complete with an exception.
3434
*
35-
* Cancellability of coroutine at suspension points depends on the particular implementation details of
35+
* Cancellability of a coroutine at suspension points depends on the particular implementation details of
3636
* suspending functions. Use [suspendCancellableCoroutine] to implement cancellable suspending functions.
3737
*/
3838
DEFAULT,
3939

4040
/**
41-
* Starts coroutine lazily, only when it is needed.
41+
* Starts the coroutine lazily, only when it is needed.
4242
*
4343
* See the documentation for the corresponding coroutine builders for details
4444
* (like [launch][CoroutineScope.launch] and [async][CoroutineScope.async]).
@@ -49,7 +49,7 @@ public enum class CoroutineStart {
4949
LAZY,
5050

5151
/**
52-
* Atomically (i.e., in a non-cancellable way) schedules coroutine for execution according to its context.
52+
* Atomically (i.e., in a non-cancellable way) schedules the coroutine for execution according to its context.
5353
* This is similar to [DEFAULT], but the coroutine cannot be cancelled before it starts executing.
5454
*
5555
* Cancellability of coroutine at suspension points depends on the particular implementation details of
@@ -59,7 +59,7 @@ public enum class CoroutineStart {
5959
ATOMIC,
6060

6161
/**
62-
* Immediately executes coroutine until its first suspension point _in the current thread_ as if the
62+
* Immediately executes the coroutine until its first suspension point _in the current thread_ as if the
6363
* coroutine was started using [Dispatchers.Unconfined]. However, when coroutine is resumed from suspension
6464
* it is dispatched according to the [CoroutineDispatcher] in its context.
6565
*
@@ -75,7 +75,7 @@ public enum class CoroutineStart {
7575
UNDISPATCHED;
7676

7777
/**
78-
* Starts the corresponding block as a coroutine with this coroutine start strategy.
78+
* Starts the corresponding block as a coroutine with this coroutine's start strategy.
7979
*
8080
* * [DEFAULT] uses [startCoroutineCancellable].
8181
* * [ATOMIC] uses [startCoroutine].

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import kotlin.jvm.*
2424
* can [cancel] its own children (including all their children recursively) without cancelling itself.
2525
*
2626
* The most basic instances of [Job] are created with [launch][CoroutineScope.launch] coroutine builder or with a
27-
* `Job()` factory function. By default, a failure of any of the job's children leads to an immediately failure
27+
* `Job()` factory function. By default, a failure of any of the job's children leads to an immediate failure
2828
* of its parent and cancellation of the rest of its children. This behavior can be customized using [SupervisorJob].
2929
*
3030
* Conceptually, an execution of the job does not produce a result value. Jobs are launched solely for their
@@ -46,8 +46,8 @@ import kotlin.jvm.*
4646
* [CoroutineStart.LAZY]. Such a job can be made _active_ by invoking [start] or [join].
4747
*
4848
* A job is _active_ while the coroutine is working. Failure of the job with exception makes it _cancelling_.
49-
* A job can be cancelled it at any time with [cancel] function that forces it to transition to
50-
* _cancelling_ state immediately. The job becomes _cancelled_ when it finishes executing it work.
49+
* A job can be cancelled at any time with [cancel] function that forces it to transition to
50+
* _cancelling_ state immediately. The job becomes _cancelled_ when it finishes executing its work.
5151
*
5252
* ```
5353
* wait children

0 commit comments

Comments
 (0)