Skip to content

Commit 00e6cbf

Browse files
elizarovizeye
andauthored
Fix examples in coroutine-basics.md (#2711)
Co-authored-by: Johnny Lim <[email protected]>
1 parent c03ca62 commit 00e6cbf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docs/topics/coroutines-basics.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ suspend fun doWorld() = coroutineScope { // this: CoroutineScope
152152

153153
This code also prints:
154154

155-
<!--- TEST
155+
```text
156156
Hello
157157
World!
158-
-->
158+
```
159+
160+
<!--- TEST -->
159161

160162
## Scope builder and concurrency
161163

@@ -166,7 +168,7 @@ Let's launch two concurrent coroutines inside a `doWorld` suspending function:
166168
import kotlinx.coroutines.*
167169

168170
//sampleStart
169-
// Sequentially executes doWorld followed by "Hello"
171+
// Sequentially executes doWorld followed by "Done"
170172
fun main() = runBlocking {
171173
doWorld()
172174
println("Done")

kotlinx-coroutines-core/jvm/test/guide/example-basic-04.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package kotlinx.coroutines.guide.exampleBasic04
77

88
import kotlinx.coroutines.*
99

10-
// Sequentially executes doWorld followed by "Hello"
10+
// Sequentially executes doWorld followed by "Done"
1111
fun main() = runBlocking {
1212
doWorld()
1313
println("Done")

0 commit comments

Comments
 (0)