Skip to content

Commit 977ada1

Browse files
bradcypertelizarov
authored andcommitted
Minor grammatical changes to the Coroutines guide
Minor fixes for the English grammar in the coroutines guide to help ensure new readers understand coroutines properly.
1 parent dae510b commit 977ada1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coroutines-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ This section covers coroutine cancellation and timeouts.
333333

334334
### Cancelling coroutine execution
335335

336-
In small application the return from "main" method might sound like a good idea to get all coroutines
337-
implicitly terminated. In a larger, long-running application, you need finer-grained control.
336+
In a small application the return from "main" method might sound like a good idea to get all coroutines
337+
implicitly terminated but in a larger, long-running application, you need finer-grained control.
338338
The [launch] function returns a [Job] that can be used to cancel running coroutine:
339339

340340
```kotlin
@@ -460,7 +460,7 @@ main: Now I can quit.
460460
### Closing resources with finally
461461

462462
Cancellable suspending functions throw [CancellationException] on cancellation which can be handled in
463-
all the usual way. For example, `try {...} finally {...}` expression and Kotlin `use` function execute their
463+
the usual way. For example, `try {...} finally {...}` expression and Kotlin `use` function execute their
464464
finalization actions normally when coroutine is cancelled:
465465

466466
```kotlin
@@ -544,7 +544,7 @@ main: Now I can quit.
544544

545545
### Timeout
546546

547-
The most obvious reason to cancel coroutine execution in practice,
547+
The most obvious reason to cancel coroutine execution in practice
548548
is because its execution time has exceeded some timeout.
549549
While you can manually track the reference to the corresponding [Job] and launch a separate coroutine to cancel
550550
the tracked one after delay, there is a ready to use [withTimeout] function that does it.

0 commit comments

Comments
 (0)