diff --git a/docs/topics/coroutine-context-and-dispatchers.md b/docs/topics/coroutine-context-and-dispatchers.md index 4e5ed02b87..6c06b14d07 100644 --- a/docs/topics/coroutine-context-and-dispatchers.md +++ b/docs/topics/coroutine-context-and-dispatchers.md @@ -334,8 +334,8 @@ fun main() = runBlocking { } delay(500) request.cancel() // cancel processing of the request - delay(1000) // delay a second to see what happens println("main: Who has survived request cancellation?") + delay(1000) // delay the main thread for a second to see what happens //sampleEnd } ``` @@ -350,8 +350,8 @@ The output of this code is: ```text job1: I run in my own Job and execute independently! job2: I am a child of the request coroutine -job1: I am not affected by cancellation of the request main: Who has survived request cancellation? +job1: I am not affected by cancellation of the request ``` diff --git a/kotlinx-coroutines-core/jvm/test/guide/example-context-06.kt b/kotlinx-coroutines-core/jvm/test/guide/example-context-06.kt index c6ad4516da..6796532229 100644 --- a/kotlinx-coroutines-core/jvm/test/guide/example-context-06.kt +++ b/kotlinx-coroutines-core/jvm/test/guide/example-context-06.kt @@ -26,6 +26,6 @@ fun main() = runBlocking { } delay(500) request.cancel() // cancel processing of the request - delay(1000) // delay a second to see what happens println("main: Who has survived request cancellation?") + delay(1000) // delay the main thread for a second to see what happens } diff --git a/kotlinx-coroutines-core/jvm/test/guide/test/DispatcherGuideTest.kt b/kotlinx-coroutines-core/jvm/test/guide/test/DispatcherGuideTest.kt index 1a84fb9427..e18741e981 100644 --- a/kotlinx-coroutines-core/jvm/test/guide/test/DispatcherGuideTest.kt +++ b/kotlinx-coroutines-core/jvm/test/guide/test/DispatcherGuideTest.kt @@ -59,8 +59,8 @@ class DispatcherGuideTest { test("ExampleContext06") { kotlinx.coroutines.guide.exampleContext06.main() }.verifyLines( "job1: I run in my own Job and execute independently!", "job2: I am a child of the request coroutine", - "job1: I am not affected by cancellation of the request", - "main: Who has survived request cancellation?" + "main: Who has survived request cancellation?", + "job1: I am not affected by cancellation of the request" ) } diff --git a/kotlinx-coroutines-core/jvm/test/guide/test/GuideTest.kt b/kotlinx-coroutines-core/jvm/test/guide/test/GuideTest.kt deleted file mode 100644 index e69de29bb2..0000000000