Skip to content

Commit 7050899

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 99c6ac7 + 977ada1 commit 7050899

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
@@ -321,8 +321,8 @@ This section covers coroutine cancellation and timeouts.
321321

322322
### Cancelling coroutine execution
323323

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

328328
```kotlin
@@ -448,7 +448,7 @@ main: Now I can quit.
448448
### Closing resources with finally
449449

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

454454
```kotlin
@@ -532,7 +532,7 @@ main: Now I can quit.
532532

533533
### Timeout
534534

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

0 commit comments

Comments
 (0)