Reknit examples (don't optimize imports)
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-01.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-01.kt
index a195875..b183bb8 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-01.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-01.kt
@@ -17,8 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example01
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) {
launch { // launch new coroutine
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-02.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-02.kt
index 27b4864..12e3944 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-02.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-02.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example02
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> { // start main coroutine
launch { // launch new coroutine
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-03.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-03.kt
index 45002ff..cfb9b8c 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-03.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-03.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example03
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val job = launch { // launch new coroutine and keep a reference to its Job
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-04.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-04.kt
index 3978226..f7f0809 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-04.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-04.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example04
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val job = launch { doWorld() }
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-05.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-05.kt
index 07e657f..40dc0cc 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-05.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-05.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example05
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val jobs = List(100_000) { // launch a lot of coroutines and list their jobs
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-06.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-06.kt
index 5a967e6..1e28111 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-06.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-basic-06.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example06
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
launch {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-01.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-01.kt
index fd92d4b..c32c8c5 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-01.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-01.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.cancel.example01
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val job = launch {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-02.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-02.kt
index 35180ff..6d5d42d 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-02.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-02.kt
@@ -17,10 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.cancel.example02
-import kotlinx.coroutines.experimental.cancelAndJoin
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val startTime = System.currentTimeMillis()
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-03.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-03.kt
index 3264726..b058717 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-03.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-03.kt
@@ -17,10 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.cancel.example03
-import kotlinx.coroutines.experimental.cancelAndJoin
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val startTime = System.currentTimeMillis()
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-04.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-04.kt
index 7aa05c6..b715f8a 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-04.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-cancel-04.kt
@@ -17,10 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.cancel.example04
-import kotlinx.coroutines.experimental.cancelAndJoin
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val job = launch {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-01.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-01.kt
index e853fd3..f7cc266 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-01.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-01.kt
@@ -17,9 +17,8 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.channel.example01
-import kotlinx.coroutines.experimental.channels.Channel
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.experimental.channels.*
fun main(args: Array<String>) = runBlocking<Unit> {
val channel = Channel<Int>()
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-02.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-02.kt
index 0b93841..d7ff4c3 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-02.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-02.kt
@@ -17,9 +17,8 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.channel.example02
-import kotlinx.coroutines.experimental.channels.Channel
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.experimental.channels.*
fun main(args: Array<String>) = runBlocking<Unit> {
val channel = Channel<Int>()
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-03.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-03.kt
index 3270fc1..b0cbf6a 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-03.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-03.kt
@@ -17,9 +17,8 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.channel.example03
-import kotlinx.coroutines.experimental.channels.consumeEach
-import kotlinx.coroutines.experimental.channels.produce
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.experimental.channels.*
fun produceSquares() = produce<Int> {
for (x in 1..5) send(x * x)
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-04.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-04.kt
index 736bbc2..d5d7852 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-04.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-04.kt
@@ -17,9 +17,8 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.channel.example04
-import kotlinx.coroutines.experimental.channels.ReceiveChannel
-import kotlinx.coroutines.experimental.channels.produce
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.experimental.channels.*
fun produceNumbers() = produce<Int> {
var x = 1
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-06.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-06.kt
index ddead7a..1ae1ac5 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-06.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-channel-06.kt
@@ -17,12 +17,8 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.channel.example06
-import kotlinx.coroutines.experimental.channels.ReceiveChannel
-import kotlinx.coroutines.experimental.channels.consumeEach
-import kotlinx.coroutines.experimental.channels.produce
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.experimental.channels.*
fun produceNumbers() = produce<Int> {
var x = 1 // start from 1
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-02.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-02.kt
index 1ff7b38..f39d98e 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-02.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-02.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.compose.example02
-import kotlinx.coroutines.experimental.async
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
import kotlin.system.measureTimeMillis
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-03.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-03.kt
index 80db0fe..adc8eab 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-03.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-03.kt
@@ -17,10 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.compose.example03
-import kotlinx.coroutines.experimental.CoroutineStart
-import kotlinx.coroutines.experimental.async
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
import kotlin.system.measureTimeMillis
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-04.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-04.kt
index 6f6bbcf..144eb9f 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-04.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-compose-04.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.compose.example04
-import kotlinx.coroutines.experimental.async
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
import kotlin.system.measureTimeMillis
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-06.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-06.kt
index b601256..45bcae4 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-06.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-06.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.context.example06
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
// launch a coroutine to process some kind of incoming request
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-08.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-08.kt
index b924788..a5675ef 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-08.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-08.kt
@@ -17,9 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.context.example08
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
// launch a coroutine to process some kind of incoming request
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-09.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-09.kt
index b6a584e..7c35933 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-09.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-context-09.kt
@@ -17,10 +17,7 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.context.example09
-import kotlinx.coroutines.experimental.CoroutineName
-import kotlinx.coroutines.experimental.async
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-04.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-04.kt
index 07d959d..aae5843 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-04.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-04.kt
@@ -17,11 +17,9 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.select.example04
-import kotlinx.coroutines.experimental.Deferred
-import kotlinx.coroutines.experimental.async
-import kotlinx.coroutines.experimental.delay
-import kotlinx.coroutines.experimental.runBlocking
-import kotlinx.coroutines.experimental.selects.select
+import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.experimental.selects.*
import java.util.*
fun asyncString(time: Int) = async {
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-05.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-05.kt
index 6d35cf0..84ba4e5 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-05.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-select-05.kt
@@ -18,10 +18,8 @@
package guide.select.example05
import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.Channel
-import kotlinx.coroutines.experimental.channels.ReceiveChannel
-import kotlinx.coroutines.experimental.channels.produce
-import kotlinx.coroutines.experimental.selects.select
+import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.experimental.selects.*
fun switchMapDeferreds(input: ReceiveChannel<Deferred<String>>) = produce<String> {
var current = input.receive() // start with first received deferred value
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-07.kt b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-07.kt
index 29d76fd..433d688 100644
--- a/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-07.kt
+++ b/core/kotlinx-coroutines-core/src/test/kotlin/guide/example-sync-07.kt
@@ -17,13 +17,10 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.sync.example07
-import kotlinx.coroutines.experimental.CommonPool
-import kotlinx.coroutines.experimental.CompletableDeferred
-import kotlinx.coroutines.experimental.channels.actor
-import kotlinx.coroutines.experimental.launch
-import kotlinx.coroutines.experimental.runBlocking
+import kotlinx.coroutines.experimental.*
import kotlin.coroutines.experimental.CoroutineContext
import kotlin.system.measureTimeMillis
+import kotlinx.coroutines.experimental.channels.*
suspend fun massiveRun(context: CoroutineContext, action: suspend () -> Unit) {
val n = 1000 // number of coroutines to launch