Created
February 2, 2020 10:33
-
-
Save Tetraquark/6bc20a619735f19fa342158cb2da7e80 to your computer and use it in GitHub Desktop.
What is channel? ProduceChannelExmpl
This file contains 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
import kotlinx.coroutines.channels.produce | |
val receiveChannel = produce(context = Dispatchers.Default) { | |
for (i in 0..10) { | |
send(i) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment