Skip to content

Commit 674efea

Browse files
committed
More robust example-context-09 for test
1 parent d9ae2bc commit 674efea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-09.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ fun main(args: Array<String>) = runBlocking(CoroutineName("main")) {
2525
log("Started main coroutine")
2626
// run two background value computations
2727
val v1 = async(CoroutineName("v1coroutine")) {
28-
log("Computing v1")
2928
delay(500)
29+
log("Computing v1")
3030
252
3131
}
3232
val v2 = async(CoroutineName("v2coroutine")) {
33-
log("Computing v2")
3433
delay(1000)
34+
log("Computing v2")
3535
6
3636
}
3737
log("The answer for v1 / v2 = ${v1.await() / v2.await()}")

coroutines-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,13 +1121,13 @@ fun main(args: Array<String>) = runBlocking(CoroutineName("main")) {
11211121
log("Started main coroutine")
11221122
// run two background value computations
11231123
val v1 = async(CoroutineName("v1coroutine")) {
1124-
log("Computing v1")
11251124
delay(500)
1125+
log("Computing v1")
11261126
252
11271127
}
11281128
val v2 = async(CoroutineName("v2coroutine")) {
1129-
log("Computing v2")
11301129
delay(1000)
1130+
log("Computing v2")
11311131
6
11321132
}
11331133
log("The answer for v1 / v2 = ${v1.await() / v2.await()}")

0 commit comments

Comments
 (0)