Skip to content

Commit 41019b3

Browse files
chore: reference to The Hitchhiker's Guide to the Galaxy
At the end of the book, they multiply 6 * 7 :)
1 parent 0ca7358 commit 41019b3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/topics/coroutine-context-and-dispatchers.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,14 @@ fun main() = runBlocking(CoroutineName("main")) {
420420
val v1 = async(CoroutineName("v1coroutine")) {
421421
delay(500)
422422
log("Computing v1")
423-
252
423+
6
424424
}
425425
val v2 = async(CoroutineName("v2coroutine")) {
426426
delay(1000)
427427
log("Computing v2")
428-
6
428+
7
429429
}
430-
log("The answer for v1 / v2 = ${v1.await() / v2.await()}")
430+
log("The answer for v1 * v2 = ${v1.await() * v2.await()}")
431431
//sampleEnd
432432
}
433433
```
@@ -443,7 +443,7 @@ The output it produces with `-Dkotlinx.coroutines.debug` JVM option is similar t
443443
[main @main#1] Started main coroutine
444444
[main @v1coroutine#2] Computing v1
445445
[main @v2coroutine#3] Computing v2
446-
[main @main#1] The answer for v1 / v2 = 42
446+
[main @main#1] The answer for v1 * v2 = 42
447447
```
448448

449449
<!--- TEST FLEXIBLE_THREAD -->

kotlinx-coroutines-core/jvm/test/guide/example-context-08.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ fun main() = runBlocking(CoroutineName("main")) {
1111
val v1 = async(CoroutineName("v1coroutine")) {
1212
delay(500)
1313
log("Computing v1")
14-
252
14+
6
1515
}
1616
val v2 = async(CoroutineName("v2coroutine")) {
1717
delay(1000)
1818
log("Computing v2")
19-
6
19+
7
2020
}
21-
log("The answer for v1 / v2 = ${v1.await() / v2.await()}")
21+
log("The answer for v1 * v2 = ${v1.await() * v2.await()}")
2222
}

0 commit comments

Comments
 (0)