@@ -137,7 +137,7 @@ fun main() = runBlocking {
137
137
138
138
While catching ` Exception ` is an anti-pattern, this issue may surface in more subtle ways, like when using the
139
139
[ ` runCatching ` ] ( https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/run-catching.html ) function,
140
- which does not know rethrow [ CancellationException] .
140
+ which does not rethrow [ CancellationException] .
141
141
142
142
## Making computation code cancellable
143
143
@@ -190,8 +190,8 @@ main: Now I can quit.
190
190
191
191
## Closing resources with ` finally `
192
192
193
- Cancellable suspending functions throw [ CancellationException] on cancellation which can be handled in
194
- the usual way. For example, ` try {...} finally {...} ` expression and Kotlin ` use ` function execute their
193
+ Cancellable suspending functions throw [ CancellationException] on cancellation, which can be handled in
194
+ the usual way. For example, the ` try {...} finally {...} ` expression and Kotlin's ` use ` function execute their
195
195
finalization actions normally when a coroutine is cancelled:
196
196
197
197
``` kotlin
@@ -423,13 +423,13 @@ fun main() {
423
423
If you run the above code you'll see that it does not always print zero, though it may depend on the timings
424
424
of your machine you may need to tweak timeouts in this example to actually see non-zero values.
425
425
426
- > Note, that incrementing and decrementing ` acquired ` counter here from 100K coroutines is completely safe,
426
+ > Note that incrementing and decrementing ` acquired ` counter here from 100K coroutines is completely safe,
427
427
> since it always happens from the same main thread. More on that will be explained in the chapter
428
428
> on coroutine context.
429
429
>
430
430
{type="note"}
431
431
432
- To workaround this problem you can store a reference to the resource in the variable as opposed to returning it
432
+ To work around this problem you can store a reference to the resource in the variable as opposed to returning it
433
433
from the ` withTimeout ` block.
434
434
435
435
``` kotlin
0 commit comments