File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
kotlinx-coroutines-core/jvm/test/guide Expand file tree Collapse file tree 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> {
334334 }
335335 delay(500 )
336336 request.cancel() // cancel processing of the request
337- delay(1000 ) // delay a second to see what happens
338337 println (" main: Who has survived request cancellation?" )
338+ delay(1000 ) // delay the main thread for a second to see what happens
339339// sampleEnd
340340}
341341```
@@ -350,8 +350,8 @@ The output of this code is:
350350``` text
351351job1: I run in my own Job and execute independently!
352352job2: I am a child of the request coroutine
353- job1: I am not affected by cancellation of the request
354353main: Who has survived request cancellation?
354+ job1: I am not affected by cancellation of the request
355355```
356356
357357<!-- - TEST -->
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ fun main() = runBlocking<Unit> {
2626 }
2727 delay(500 )
2828 request.cancel() // cancel processing of the request
29- delay(1000 ) // delay a second to see what happens
3029 println (" main: Who has survived request cancellation?" )
30+ delay(1000 ) // delay the main thread for a second to see what happens
3131}
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ class DispatcherGuideTest {
5959 test(" ExampleContext06" ) { kotlinx.coroutines.guide.exampleContext06.main() }.verifyLines(
6060 " job1: I run in my own Job and execute independently!" ,
6161 " 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 "
6464 )
6565 }
6666
You can’t perform that action at this time.
0 commit comments