diff --git a/docs/topics/select-expression.md b/docs/topics/select-expression.md index f3055737c8..8c4866ba89 100644 --- a/docs/topics/select-expression.md +++ b/docs/topics/select-expression.md @@ -63,14 +63,14 @@ import kotlinx.coroutines.selects.* fun CoroutineScope.fizz() = produce { while (true) { // sends "Fizz" every 300 ms - delay(300) + delay(500) send("Fizz") } } fun CoroutineScope.buzz() = produce { while (true) { // sends "Buzz!" every 500 ms - delay(500) + delay(1000) send("Buzz!") } } @@ -112,7 +112,7 @@ fizz -> 'Fizz' fizz -> 'Fizz' buzz -> 'Buzz!' fizz -> 'Fizz' -buzz -> 'Buzz!' +fizz -> 'Fizz' ``` diff --git a/kotlinx-coroutines-core/jvm/test/guide/example-select-01.kt b/kotlinx-coroutines-core/jvm/test/guide/example-select-01.kt index c1a962e60d..e4f9d31250 100644 --- a/kotlinx-coroutines-core/jvm/test/guide/example-select-01.kt +++ b/kotlinx-coroutines-core/jvm/test/guide/example-select-01.kt @@ -11,14 +11,14 @@ import kotlinx.coroutines.selects.* fun CoroutineScope.fizz() = produce { while (true) { // sends "Fizz" every 300 ms - delay(300) + delay(500) send("Fizz") } } fun CoroutineScope.buzz() = produce { while (true) { // sends "Buzz!" every 500 ms - delay(500) + delay(1000) send("Buzz!") } } diff --git a/kotlinx-coroutines-core/jvm/test/guide/test/SelectGuideTest.kt b/kotlinx-coroutines-core/jvm/test/guide/test/SelectGuideTest.kt index 55650d4c6a..8bc81913d7 100644 --- a/kotlinx-coroutines-core/jvm/test/guide/test/SelectGuideTest.kt +++ b/kotlinx-coroutines-core/jvm/test/guide/test/SelectGuideTest.kt @@ -18,7 +18,7 @@ class SelectGuideTest { "fizz -> 'Fizz'", "buzz -> 'Buzz!'", "fizz -> 'Fizz'", - "buzz -> 'Buzz!'" + "fizz -> 'Fizz'" ) }