@@ -364,6 +364,7 @@ only downwards. This can easily be demonstrated using the following example:
364364import kotlinx.coroutines.*
365365
366366fun main () = runBlocking {
367+ // sampleStart
367368 val supervisor = SupervisorJob ()
368369 with (CoroutineScope (coroutineContext + supervisor)) {
369370 // launch the first child -- its exception is ignored for this example (don't do this in practice!)
@@ -389,8 +390,10 @@ fun main() = runBlocking {
389390 supervisor.cancel()
390391 secondChild.join()
391392 }
393+ // sampleEnd
392394}
393395```
396+ {kotlin-runnable="true" kotlin-min-compiler-version="1.3"}
394397
395398> You can get the full code [ here] ( ../../kotlinx-coroutines-core/jvm/test/guide/example-supervision-01.kt ) .
396399>
@@ -418,6 +421,7 @@ import kotlin.coroutines.*
418421import kotlinx.coroutines.*
419422
420423fun main () = runBlocking {
424+ // sampleStart
421425 try {
422426 supervisorScope {
423427 val child = launch {
@@ -436,8 +440,10 @@ fun main() = runBlocking {
436440 } catch (e: AssertionError ) {
437441 println (" Caught an assertion error" )
438442 }
443+ // sampleEnd
439444}
440445```
446+ {kotlin-runnable="true" kotlin-min-compiler-version="1.3"}
441447
442448> You can get the full code [ here] ( ../../kotlinx-coroutines-core/jvm/test/guide/example-supervision-02.kt ) .
443449>
@@ -468,6 +474,7 @@ import kotlin.coroutines.*
468474import kotlinx.coroutines.*
469475
470476fun main () = runBlocking {
477+ // sampleStart
471478 val handler = CoroutineExceptionHandler { _, exception ->
472479 println (" CoroutineExceptionHandler got $exception " )
473480 }
@@ -479,8 +486,10 @@ fun main() = runBlocking {
479486 println (" The scope is completing" )
480487 }
481488 println (" The scope is completed" )
489+ // sampleEnd
482490}
483491```
492+ {kotlin-runnable="true" kotlin-min-compiler-version="1.3"}
484493
485494> You can get the full code [ here] ( ../../kotlinx-coroutines-core/jvm/test/guide/example-supervision-03.kt ) .
486495>
0 commit comments