Created
October 21, 2022 02:42
-
-
Save alokomkar/9e9e409b1242230162bb0a58ea11e0a0 to your computer and use it in GitHub Desktop.
Light weight coroutines
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
| import kotlinx.coroutines.* | |
| fun main() = runBlocking { | |
| repeat(100_000) { // launch a lot of coroutines | |
| launch { | |
| delay(5000L) | |
| print(".") | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment