blob: 6c4bdfb9825ddb6b7c59e6990bf6c6c9da12f00a [file] [log] [blame]
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example05
import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val jobs = List(100_000) { // create a lot of coroutines and list their jobs
launch(CommonPool) {
delay(1000L)
print(".")
}
}
jobs.forEach { it.join() } // wait for all jobs to complete
}