Created
November 7, 2018 18:54
-
-
Save mayojava/a1c8a711d4a7a8ae2d35bba4895c2b12 to your computer and use it in GitHub Desktop.
BroadcastChannel does not suspend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() = runBlocking { | |
val channel = BroadcastChannel<Int>(1) | |
repeat(10) { | |
channel.send(it) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment