@@ -65,7 +65,7 @@ fun main() = runBlocking<Unit> {
65
65
66
66
</div >
67
67
68
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-01.kt ) .
68
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-01.kt ) .
69
69
70
70
It produces the following output (maybe in different order):
71
71
@@ -129,7 +129,7 @@ fun main() = runBlocking<Unit> {
129
129
130
130
</div >
131
131
132
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-02.kt ) .
132
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-02.kt ) .
133
133
134
134
Produces the output:
135
135
@@ -186,7 +186,7 @@ fun main() = runBlocking<Unit> {
186
186
187
187
</div >
188
188
189
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-03.kt ) .
189
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-03.kt ) .
190
190
191
191
There are three coroutines. The main coroutine (#1 ) inside ` runBlocking `
192
192
and two coroutines computing the deferred values ` a ` (#2 ) and ` b ` (#3 ).
@@ -238,7 +238,7 @@ fun main() {
238
238
239
239
</div >
240
240
241
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-04.kt ) .
241
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-04.kt ) .
242
242
243
243
It demonstrates several new techniques. One is using [ runBlocking] with an explicitly specified context, and
244
244
the other one is using the [ withContext] function to change the context of a coroutine while still staying in the
@@ -274,7 +274,7 @@ fun main() = runBlocking<Unit> {
274
274
275
275
</div >
276
276
277
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-05.kt ) .
277
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-05.kt ) .
278
278
279
279
In the [ debug mode] ( #debugging-coroutines-and-threads ) , it outputs something like this:
280
280
@@ -332,7 +332,7 @@ fun main() = runBlocking<Unit> {
332
332
333
333
</div >
334
334
335
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-06.kt ) .
335
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-06.kt ) .
336
336
337
337
The output of this code is:
338
338
@@ -375,7 +375,7 @@ fun main() = runBlocking<Unit> {
375
375
376
376
</div >
377
377
378
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-07.kt ) .
378
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-07.kt ) .
379
379
380
380
The result is going to be:
381
381
@@ -427,7 +427,7 @@ fun main() = runBlocking(CoroutineName("main")) {
427
427
428
428
</div >
429
429
430
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-08.kt ) .
430
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-08.kt ) .
431
431
432
432
The output it produces with ` -Dkotlinx.coroutines.debug ` JVM option is similar to:
433
433
@@ -462,7 +462,7 @@ fun main() = runBlocking<Unit> {
462
462
463
463
</div >
464
464
465
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-09.kt ) .
465
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-09.kt ) .
466
466
467
467
The output of this code with the ` -Dkotlinx.coroutines.debug ` JVM option is:
468
468
@@ -566,7 +566,7 @@ fun main() = runBlocking<Unit> {
566
566
567
567
</div >
568
568
569
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-10.kt ) .
569
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-10.kt ) .
570
570
571
571
The output of this example is:
572
572
@@ -620,7 +620,7 @@ fun main() = runBlocking<Unit> {
620
620
621
621
</div >
622
622
623
- > You can get full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-11.kt ) .
623
+ > You can get the full code [ here] ( ../kotlinx-coroutines-core/jvm/test/guide/example-context-11.kt ) .
624
624
625
625
In this example we launch a new coroutine in a background thread pool using [ Dispatchers.Default] , so
626
626
it works on a different thread from the thread pool, but it still has the value of the thread local variable
0 commit comments