File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
core/kotlinx-coroutines-core/src/test/kotlin/guide Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ fun main(args: Array<String>) = runBlocking(CoroutineName("main")) {
25
25
log(" Started main coroutine" )
26
26
// run two background value computations
27
27
val v1 = async(CoroutineName (" v1coroutine" )) {
28
- log(" Computing v1" )
29
28
delay(500 )
29
+ log(" Computing v1" )
30
30
252
31
31
}
32
32
val v2 = async(CoroutineName (" v2coroutine" )) {
33
- log(" Computing v2" )
34
33
delay(1000 )
34
+ log(" Computing v2" )
35
35
6
36
36
}
37
37
log(" The answer for v1 / v2 = ${v1.await() / v2.await()} " )
Original file line number Diff line number Diff line change @@ -1121,13 +1121,13 @@ fun main(args: Array<String>) = runBlocking(CoroutineName("main")) {
1121
1121
log(" Started main coroutine" )
1122
1122
// run two background value computations
1123
1123
val v1 = async(CoroutineName (" v1coroutine" )) {
1124
- log(" Computing v1" )
1125
1124
delay(500 )
1125
+ log(" Computing v1" )
1126
1126
252
1127
1127
}
1128
1128
val v2 = async(CoroutineName (" v2coroutine" )) {
1129
- log(" Computing v2" )
1130
1129
delay(1000 )
1130
+ log(" Computing v2" )
1131
1131
6
1132
1132
}
1133
1133
log(" The answer for v1 / v2 = ${v1.await() / v2.await()} " )
You can’t perform that action at this time.
0 commit comments