File tree 4 files changed +5
-5
lines changed
kotlinx-coroutines-core/jvm/test/guide
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -334,8 +334,8 @@ fun main() = runBlocking<Unit> {
334
334
}
335
335
delay(500 )
336
336
request.cancel() // cancel processing of the request
337
- delay(1000 ) // delay a second to see what happens
338
337
println (" main: Who has survived request cancellation?" )
338
+ delay(1000 ) // delay the main thread for a second to see what happens
339
339
// sampleEnd
340
340
}
341
341
```
@@ -350,8 +350,8 @@ The output of this code is:
350
350
``` text
351
351
job1: I run in my own Job and execute independently!
352
352
job2: I am a child of the request coroutine
353
- job1: I am not affected by cancellation of the request
354
353
main: Who has survived request cancellation?
354
+ job1: I am not affected by cancellation of the request
355
355
```
356
356
357
357
<!-- - TEST -->
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ fun main() = runBlocking<Unit> {
26
26
}
27
27
delay(500 )
28
28
request.cancel() // cancel processing of the request
29
- delay(1000 ) // delay a second to see what happens
30
29
println (" main: Who has survived request cancellation?" )
30
+ delay(1000 ) // delay the main thread for a second to see what happens
31
31
}
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ class DispatcherGuideTest {
59
59
test(" ExampleContext06" ) { kotlinx.coroutines.guide.exampleContext06.main() }.verifyLines(
60
60
" job1: I run in my own Job and execute independently!" ,
61
61
" job2: I am a child of the request coroutine" ,
62
- " job1: I am not affected by cancellation of the request " ,
63
- " main: Who has survived request cancellation? "
62
+ " main: Who has survived request cancellation? " ,
63
+ " job1: I am not affected by cancellation of the request "
64
64
)
65
65
}
66
66
You can’t perform that action at this time.
0 commit comments