Roman Elizarov | b3d55a5 | 2017-02-03 12:47:21 +0300 | [diff] [blame] | 1 | // This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit. |
Roman Elizarov | fa7723e | 2017-02-06 11:17:51 +0300 | [diff] [blame^] | 2 | package guide.basic.example06 |
Roman Elizarov | b3d55a5 | 2017-02-03 12:47:21 +0300 | [diff] [blame] | 3 | |
| 4 | import kotlinx.coroutines.experimental.* |
| 5 | |
| 6 | fun main(args: Array<String>) = runBlocking<Unit> { |
| 7 | launch(CommonPool) { |
| 8 | repeat(1000) { i -> |
| 9 | println("I'm sleeping $i ...") |
| 10 | delay(500L) |
| 11 | } |
| 12 | } |
| 13 | delay(1300L) // just quit after delay |
| 14 | } |