Skip to content

Commit 171fcc1

Browse files
vadimsemenovelizarov
authored andcommitted
Fix typos in comments to ticker channels (#1987)
1 parent 134a4bc commit 171fcc1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/channels.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,9 @@ import kotlinx.coroutines.channels.*
634634
fun main() = runBlocking<Unit> {
635635
val tickerChannel = ticker(delayMillis = 100, initialDelayMillis = 0) // create ticker channel
636636
var nextElement = withTimeoutOrNull(1) { tickerChannel.receive() }
637-
println("Initial element is available immediately: $nextElement") // initial delay hasn't passed yet
637+
println("Initial element is available immediately: $nextElement") // no initial delay
638638

639-
nextElement = withTimeoutOrNull(50) { tickerChannel.receive() } // all subsequent elements has 100ms delay
639+
nextElement = withTimeoutOrNull(50) { tickerChannel.receive() } // all subsequent elements have 100ms delay
640640
println("Next element is not ready in 50 ms: $nextElement")
641641

642642
nextElement = withTimeoutOrNull(60) { tickerChannel.receive() }

kotlinx-coroutines-core/jvm/test/guide/example-channel-10.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import kotlinx.coroutines.channels.*
1111
fun main() = runBlocking<Unit> {
1212
val tickerChannel = ticker(delayMillis = 100, initialDelayMillis = 0) // create ticker channel
1313
var nextElement = withTimeoutOrNull(1) { tickerChannel.receive() }
14-
println("Initial element is available immediately: $nextElement") // initial delay hasn't passed yet
14+
println("Initial element is available immediately: $nextElement") // no initial delay
1515

16-
nextElement = withTimeoutOrNull(50) { tickerChannel.receive() } // all subsequent elements has 100ms delay
16+
nextElement = withTimeoutOrNull(50) { tickerChannel.receive() } // all subsequent elements have 100ms delay
1717
println("Next element is not ready in 50 ms: $nextElement")
1818

1919
nextElement = withTimeoutOrNull(60) { tickerChannel.receive() }

0 commit comments

Comments
 (0)