Migrate to Kotlin 1.3 coroutines, drop experimental from package
* Features based on version 0.30.0
* Uses Kotlin version 1.3.0-rc-57
* Uses Kotlin/Native version 0.9.2
* Uses AtomicFu 0.11.9-eap13
* Replace SuccessOrFailure with Result
* Replace buildSequence and buildIterator with sequence and iterator
* Apply @BuilderInference on all builders (including extension methods to workaround inference bug)
diff --git a/core/kotlinx-coroutines-core/README.md b/core/kotlinx-coroutines-core/README.md
index 5093fd1..bede854 100644
--- a/core/kotlinx-coroutines-core/README.md
+++ b/core/kotlinx-coroutines-core/README.md
@@ -8,8 +8,8 @@
| ------------- | ------------- | ---------------- | ---------------
| [launch] | [Job] | [CoroutineScope] | Launches coroutine that does not have any result
| [async] | [Deferred] | [CoroutineScope] | Returns a single value with the future result
-| [produce][kotlinx.coroutines.experimental.channels.produce] | [ReceiveChannel][kotlinx.coroutines.experimental.channels.ReceiveChannel] | [ProducerScope][kotlinx.coroutines.experimental.channels.ProducerScope] | Produces a stream of elements
-| [actor][kotlinx.coroutines.experimental.channels.actor] | [SendChannel][kotlinx.coroutines.experimental.channels.SendChannel] | [ActorScope][kotlinx.coroutines.experimental.channels.ActorScope] | Processes a stream of messages
+| [produce][kotlinx.coroutines.channels.produce] | [ReceiveChannel][kotlinx.coroutines.channels.ReceiveChannel] | [ProducerScope][kotlinx.coroutines.channels.ProducerScope] | Produces a stream of elements
+| [actor][kotlinx.coroutines.channels.actor] | [SendChannel][kotlinx.coroutines.channels.SendChannel] | [ActorScope][kotlinx.coroutines.channels.ActorScope] | Processes a stream of messages
| [runBlocking] | `T` | [CoroutineScope] | Blocks the thread while the coroutine runs
Coroutine dispatchers implementing [CoroutineDispatcher]:
@@ -33,8 +33,8 @@
| **Name** | **Suspending functions** | **Description**
| ---------- | ----------------------------------------------------------- | ---------------
-| [Mutex][kotlinx.coroutines.experimental.sync.Mutex] | [lock][kotlinx.coroutines.experimental.sync.Mutex.lock] | Mutual exclusion
-| [Channel][kotlinx.coroutines.experimental.channels.Channel] | [send][kotlinx.coroutines.experimental.channels.SendChannel.send], [receive][kotlinx.coroutines.experimental.channels.ReceiveChannel.receive] | Communication channel (aka queue or exchanger)
+| [Mutex][kotlinx.coroutines.sync.Mutex] | [lock][kotlinx.coroutines.sync.Mutex.lock] | Mutual exclusion
+| [Channel][kotlinx.coroutines.channels.Channel] | [send][kotlinx.coroutines.channels.SendChannel.send], [receive][kotlinx.coroutines.channels.ReceiveChannel.receive] | Communication channel (aka queue or exchanger)
Top-level suspending functions:
@@ -52,108 +52,108 @@
helper function. [NonCancellable] job object is provided to suppress cancellation with
`withContext(NonCancellable) {...}` block of code.
-[Select][kotlinx.coroutines.experimental.selects.select] expression waits for the result of multiple suspending functions simultaneously:
+[Select][kotlinx.coroutines.selects.select] expression waits for the result of multiple suspending functions simultaneously:
| **Receiver** | **Suspending function** | **Select clause** | **Non-suspending version**
| ---------------- | --------------------------------------------- | ------------------------------------------------ | --------------------------
| [Job] | [join][Job.join] | [onJoin][Job.onJoin] | [isCompleted][Job.isCompleted]
| [Deferred] | [await][Deferred.await] | [onAwait][Deferred.onAwait] | [isCompleted][Job.isCompleted]
-| [SendChannel][kotlinx.coroutines.experimental.channels.SendChannel] | [send][kotlinx.coroutines.experimental.channels.SendChannel.send] | [onSend][kotlinx.coroutines.experimental.channels.SendChannel.onSend] | [offer][kotlinx.coroutines.experimental.channels.SendChannel.offer]
-| [ReceiveChannel][kotlinx.coroutines.experimental.channels.ReceiveChannel] | [receive][kotlinx.coroutines.experimental.channels.ReceiveChannel.receive] | [onReceive][kotlinx.coroutines.experimental.channels.ReceiveChannel.onReceive] | [poll][kotlinx.coroutines.experimental.channels.ReceiveChannel.poll]
-| [ReceiveChannel][kotlinx.coroutines.experimental.channels.ReceiveChannel] | [receiveOrNull][kotlinx.coroutines.experimental.channels.ReceiveChannel.receiveOrNull] | [onReceiveOrNull][kotlinx.coroutines.experimental.channels.ReceiveChannel.onReceiveOrNull] | [poll][kotlinx.coroutines.experimental.channels.ReceiveChannel.poll]
-| [Mutex][kotlinx.coroutines.experimental.sync.Mutex] | [lock][kotlinx.coroutines.experimental.sync.Mutex.lock] | [onLock][kotlinx.coroutines.experimental.sync.Mutex.onLock] | [tryLock][kotlinx.coroutines.experimental.sync.Mutex.tryLock]
-| none | [delay] | [onTimeout][kotlinx.coroutines.experimental.selects.SelectBuilder.onTimeout] | none
+| [SendChannel][kotlinx.coroutines.channels.SendChannel] | [send][kotlinx.coroutines.channels.SendChannel.send] | [onSend][kotlinx.coroutines.channels.SendChannel.onSend] | [offer][kotlinx.coroutines.channels.SendChannel.offer]
+| [ReceiveChannel][kotlinx.coroutines.channels.ReceiveChannel] | [receive][kotlinx.coroutines.channels.ReceiveChannel.receive] | [onReceive][kotlinx.coroutines.channels.ReceiveChannel.onReceive] | [poll][kotlinx.coroutines.channels.ReceiveChannel.poll]
+| [ReceiveChannel][kotlinx.coroutines.channels.ReceiveChannel] | [receiveOrNull][kotlinx.coroutines.channels.ReceiveChannel.receiveOrNull] | [onReceiveOrNull][kotlinx.coroutines.channels.ReceiveChannel.onReceiveOrNull] | [poll][kotlinx.coroutines.channels.ReceiveChannel.poll]
+| [Mutex][kotlinx.coroutines.sync.Mutex] | [lock][kotlinx.coroutines.sync.Mutex.lock] | [onLock][kotlinx.coroutines.sync.Mutex.onLock] | [tryLock][kotlinx.coroutines.sync.Mutex.tryLock]
+| none | [delay] | [onTimeout][kotlinx.coroutines.selects.SelectBuilder.onTimeout] | none
This module provides debugging facilities for coroutines (run JVM with `-ea` or `-Dkotlinx.coroutines.debug` options)
and [newCoroutineContext] function to write user-defined coroutine builders that work with these
debugging facilities.
-This module provides a special CoroutineContext type [TestCoroutineCoroutineContext][kotlinx.coroutines.experimental.test.TestCoroutineContext] that
+This module provides a special CoroutineContext type [TestCoroutineCoroutineContext][kotlinx.coroutines.test.TestCoroutineContext] that
allows the writer of code that contains Coroutines with delays and timeouts to write non-flaky unit-tests for that code allowing these tests to
terminate in near zero time. See the documentation for this class for more information.
-# Package kotlinx.coroutines.experimental
+# Package kotlinx.coroutines
General-purpose coroutine builders, contexts, and helper functions.
-# Package kotlinx.coroutines.experimental.sync
+# Package kotlinx.coroutines.sync
Synchronization primitives (mutex).
-# Package kotlinx.coroutines.experimental.channels
+# Package kotlinx.coroutines.channels
Channels -- non-blocking primitives for communicating a stream of elements between coroutines.
-# Package kotlinx.coroutines.experimental.selects
+# Package kotlinx.coroutines.selects
Select expression to perform multiple suspending operations simultaneously until one of them succeeds.
-# Package kotlinx.coroutines.experimental.intrinsics
+# Package kotlinx.coroutines.intrinsics
Low-level primitives for finer-grained control of coroutines.
-# Package kotlinx.coroutines.experimental.timeunit
+# Package kotlinx.coroutines.timeunit
Optional time unit support for multiplatform projects.
-# Package kotlinx.coroutines.experimental.test
+# Package kotlinx.coroutines.test
Components to ease writing unit-tests for code that contains coroutines with delays and timeouts.
<!--- MODULE kotlinx-coroutines-core -->
-<!--- INDEX kotlinx.coroutines.experimental -->
-[launch]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/launch.html
-[Job]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-job/index.html
-[CoroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-coroutine-scope/index.html
-[async]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/async.html
-[Deferred]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-deferred/index.html
-[runBlocking]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/run-blocking.html
-[CoroutineDispatcher]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-coroutine-dispatcher/index.html
-[Dispatchers.Default]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-dispatchers/-default.html
-[Dispatchers.Unconfined]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-dispatchers/-unconfined.html
-[newSingleThreadContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/new-single-thread-context.html
-[newFixedThreadPoolContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/new-fixed-thread-pool-context.html
-[java.util.concurrent.Executor.asCoroutineDispatcher]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/java.util.concurrent.-executor/as-coroutine-dispatcher.html
-[NonCancellable]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-non-cancellable.html
-[CoroutineExceptionHandler]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-coroutine-exception-handler/index.html
-[delay]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/delay.html
-[yield]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/yield.html
-[withContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/with-context.html
-[withTimeout]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/with-timeout.html
-[withTimeoutOrNull]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/with-timeout-or-null.html
-[awaitAll]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/await-all.html
-[joinAll]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/join-all.html
-[suspendCancellableCoroutine]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/suspend-cancellable-coroutine.html
-[Job.join]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-job/join.html
-[Job.onJoin]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-job/on-join.html
-[Job.isCompleted]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-job/is-completed.html
-[Deferred.await]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-deferred/await.html
-[Deferred.onAwait]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/-deferred/on-await.html
-[newCoroutineContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/new-coroutine-context.html
-<!--- INDEX kotlinx.coroutines.experimental.sync -->
-[kotlinx.coroutines.experimental.sync.Mutex]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.sync/-mutex/index.html
-[kotlinx.coroutines.experimental.sync.Mutex.lock]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.sync/-mutex/lock.html
-[kotlinx.coroutines.experimental.sync.Mutex.onLock]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.sync/-mutex/on-lock.html
-[kotlinx.coroutines.experimental.sync.Mutex.tryLock]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.sync/-mutex/try-lock.html
-<!--- INDEX kotlinx.coroutines.experimental.channels -->
-[kotlinx.coroutines.experimental.channels.produce]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/produce.html
-[kotlinx.coroutines.experimental.channels.ReceiveChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-receive-channel/index.html
-[kotlinx.coroutines.experimental.channels.ProducerScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-producer-scope/index.html
-[kotlinx.coroutines.experimental.channels.actor]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/actor.html
-[kotlinx.coroutines.experimental.channels.SendChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-send-channel/index.html
-[kotlinx.coroutines.experimental.channels.ActorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-actor-scope/index.html
-[kotlinx.coroutines.experimental.channels.Channel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-channel/index.html
-[kotlinx.coroutines.experimental.channels.SendChannel.send]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-send-channel/send.html
-[kotlinx.coroutines.experimental.channels.ReceiveChannel.receive]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-receive-channel/receive.html
-[kotlinx.coroutines.experimental.channels.SendChannel.onSend]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-send-channel/on-send.html
-[kotlinx.coroutines.experimental.channels.SendChannel.offer]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-send-channel/offer.html
-[kotlinx.coroutines.experimental.channels.ReceiveChannel.onReceive]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-receive-channel/on-receive.html
-[kotlinx.coroutines.experimental.channels.ReceiveChannel.poll]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-receive-channel/poll.html
-[kotlinx.coroutines.experimental.channels.ReceiveChannel.receiveOrNull]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-receive-channel/receive-or-null.html
-[kotlinx.coroutines.experimental.channels.ReceiveChannel.onReceiveOrNull]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.channels/-receive-channel/on-receive-or-null.html
-<!--- INDEX kotlinx.coroutines.experimental.selects -->
-[kotlinx.coroutines.experimental.selects.select]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.selects/select.html
-[kotlinx.coroutines.experimental.selects.SelectBuilder.onTimeout]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.selects/-select-builder/on-timeout.html
-<!--- INDEX kotlinx.coroutines.experimental.test -->
-[kotlinx.coroutines.experimental.test.TestCoroutineContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental.test/-test-coroutine-context/index.html
+<!--- INDEX kotlinx.coroutines -->
+[launch]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/launch.html
+[Job]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/index.html
+[CoroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html
+[async]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/async.html
+[Deferred]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-deferred/index.html
+[runBlocking]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html
+[CoroutineDispatcher]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html
+[Dispatchers.Default]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-default.html
+[Dispatchers.Unconfined]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-unconfined.html
+[newSingleThreadContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/new-single-thread-context.html
+[newFixedThreadPoolContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/new-fixed-thread-pool-context.html
+[java.util.concurrent.Executor.asCoroutineDispatcher]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/java.util.concurrent.-executor/as-coroutine-dispatcher.html
+[NonCancellable]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-non-cancellable.html
+[CoroutineExceptionHandler]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-exception-handler/index.html
+[delay]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/delay.html
+[yield]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/yield.html
+[withContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/with-context.html
+[withTimeout]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/with-timeout.html
+[withTimeoutOrNull]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/with-timeout-or-null.html
+[awaitAll]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/await-all.html
+[joinAll]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/join-all.html
+[suspendCancellableCoroutine]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/suspend-cancellable-coroutine.html
+[Job.join]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/join.html
+[Job.onJoin]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/on-join.html
+[Job.isCompleted]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/is-completed.html
+[Deferred.await]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-deferred/await.html
+[Deferred.onAwait]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-deferred/on-await.html
+[newCoroutineContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/new-coroutine-context.html
+<!--- INDEX kotlinx.coroutines.sync -->
+[kotlinx.coroutines.sync.Mutex]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/index.html
+[kotlinx.coroutines.sync.Mutex.lock]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/lock.html
+[kotlinx.coroutines.sync.Mutex.onLock]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/on-lock.html
+[kotlinx.coroutines.sync.Mutex.tryLock]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.sync/-mutex/try-lock.html
+<!--- INDEX kotlinx.coroutines.channels -->
+[kotlinx.coroutines.channels.produce]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/produce.html
+[kotlinx.coroutines.channels.ReceiveChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/index.html
+[kotlinx.coroutines.channels.ProducerScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-producer-scope/index.html
+[kotlinx.coroutines.channels.actor]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/actor.html
+[kotlinx.coroutines.channels.SendChannel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/index.html
+[kotlinx.coroutines.channels.ActorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-actor-scope/index.html
+[kotlinx.coroutines.channels.Channel]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-channel/index.html
+[kotlinx.coroutines.channels.SendChannel.send]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/send.html
+[kotlinx.coroutines.channels.ReceiveChannel.receive]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/receive.html
+[kotlinx.coroutines.channels.SendChannel.onSend]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/on-send.html
+[kotlinx.coroutines.channels.SendChannel.offer]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-send-channel/offer.html
+[kotlinx.coroutines.channels.ReceiveChannel.onReceive]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/on-receive.html
+[kotlinx.coroutines.channels.ReceiveChannel.poll]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/poll.html
+[kotlinx.coroutines.channels.ReceiveChannel.receiveOrNull]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/receive-or-null.html
+[kotlinx.coroutines.channels.ReceiveChannel.onReceiveOrNull]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-receive-channel/on-receive-or-null.html
+<!--- INDEX kotlinx.coroutines.selects -->
+[kotlinx.coroutines.selects.select]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.selects/select.html
+[kotlinx.coroutines.selects.SelectBuilder.onTimeout]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.selects/-select-builder/on-timeout.html
+<!--- INDEX kotlinx.coroutines.test -->
+[kotlinx.coroutines.test.TestCoroutineContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.test/-test-coroutine-context/index.html
<!--- END -->
diff --git a/core/kotlinx-coroutines-core/build.gradle b/core/kotlinx-coroutines-core/build.gradle
index 39494b5..adb0176 100644
--- a/core/kotlinx-coroutines-core/build.gradle
+++ b/core/kotlinx-coroutines-core/build.gradle
@@ -4,6 +4,7 @@
dependencies {
testCompile "com.devexperts.lincheck:core:$lincheck_version"
+ testCompile "com.esotericsoftware:kryo:4.0.0"
}
task checkJdk16() {
@@ -27,7 +28,7 @@
minHeapSize = '1g'
maxHeapSize = '1g'
enableAssertions = true
- systemProperty 'java.security.manager', 'kotlinx.coroutines.experimental.TestSecurityManager'
+ systemProperty 'java.security.manager', 'kotlinx.coroutines.TestSecurityManager'
}
test {
diff --git a/core/kotlinx-coroutines-core/src/Builders.kt b/core/kotlinx-coroutines-core/src/Builders.kt
index 8c93f4c..cd91973 100644
--- a/core/kotlinx-coroutines-core/src/Builders.kt
+++ b/core/kotlinx-coroutines-core/src/Builders.kt
@@ -5,10 +5,10 @@
@file:JvmMultifileClass
@file:JvmName("BuildersKt")
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import java.util.concurrent.locks.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* Runs new coroutine and **blocks** current thread _interruptibly_ until its completion.
diff --git a/core/kotlinx-coroutines-core/src/CommonPool.kt b/core/kotlinx-coroutines-core/src/CommonPool.kt
index 966fa50..6f4c94c 100644
--- a/core/kotlinx-coroutines-core/src/CommonPool.kt
+++ b/core/kotlinx-coroutines-core/src/CommonPool.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.timeunit.TimeUnit
+import kotlinx.coroutines.timeunit.TimeUnit
import java.util.concurrent.*
import java.util.concurrent.atomic.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* Represents common pool of shared threads as coroutine dispatcher for compute-intensive tasks.
@@ -26,7 +26,7 @@
@Deprecated(
message = "Use Dispatchers.Default",
replaceWith = ReplaceWith("Dispatchers.Default",
- imports = ["kotlinx.coroutines.experimental.Dispatchers"]))
+ imports = ["kotlinx.coroutines.Dispatchers"]))
object CommonPool : ExecutorCoroutineDispatcher() {
/**
diff --git a/core/kotlinx-coroutines-core/src/CompletionHandler.kt b/core/kotlinx-coroutines-core/src/CompletionHandler.kt
index b4b0bac..d425d6d 100644
--- a/core/kotlinx-coroutines-core/src/CompletionHandler.kt
+++ b/core/kotlinx-coroutines-core/src/CompletionHandler.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.internal.*
internal actual abstract class CompletionHandlerBase actual constructor() : LockFreeLinkedListNode(), CompletionHandler {
actual abstract override fun invoke(cause: Throwable?)
diff --git a/core/kotlinx-coroutines-core/src/CoroutineContext.kt b/core/kotlinx-coroutines-core/src/CoroutineContext.kt
index 669ff1d..ef7b66c 100644
--- a/core/kotlinx-coroutines-core/src/CoroutineContext.kt
+++ b/core/kotlinx-coroutines-core/src/CoroutineContext.kt
@@ -2,12 +2,15 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+@file:UseExperimental(ExperimentalTypeInference::class)
-import kotlinx.coroutines.experimental.internal.*
-import kotlinx.coroutines.experimental.scheduling.*
+package kotlinx.coroutines
+
+import kotlinx.coroutines.internal.*
+import kotlinx.coroutines.scheduling.*
import java.util.concurrent.atomic.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
+import kotlin.experimental.*
private val COROUTINE_ID = AtomicLong()
@@ -34,7 +37,7 @@
@Deprecated(
message = "Use Dispatchers.Default",
replaceWith = ReplaceWith("Dispatchers.Default",
- imports = ["kotlinx.coroutines.experimental.Dispatchers"]))
+ imports = ["kotlinx.coroutines.Dispatchers"]))
public actual val DefaultDispatcher: CoroutineDispatcher
get() = Dispatchers.Default
@@ -49,7 +52,7 @@
@Deprecated(
message = "Use Dispatchers.IO",
replaceWith = ReplaceWith("Dispatchers.IO",
- imports = ["kotlinx.coroutines.experimental.*"]))
+ imports = ["kotlinx.coroutines.*"]))
public val IO: CoroutineDispatcher
get() = Dispatchers.IO
@@ -76,6 +79,7 @@
* **Note: This is an experimental api.**
* Behavior of this function may change in the future with respect to its support for debugging facilities.
*/
+@BuilderInference
@ExperimentalCoroutinesApi
public actual fun CoroutineScope.newCoroutineContext(context: CoroutineContext): CoroutineContext {
val combined = coroutineContext + context
diff --git a/core/kotlinx-coroutines-core/src/CoroutineExceptionHandlerImpl.kt b/core/kotlinx-coroutines-core/src/CoroutineExceptionHandlerImpl.kt
index d570f29..8944070 100644
--- a/core/kotlinx-coroutines-core/src/CoroutineExceptionHandlerImpl.kt
+++ b/core/kotlinx-coroutines-core/src/CoroutineExceptionHandlerImpl.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import java.util.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* A list of globally installed [CoroutineExceptionHandler] instances.
diff --git a/core/kotlinx-coroutines-core/src/Debug.kt b/core/kotlinx-coroutines-core/src/Debug.kt
index 6a31687..422c0df 100644
--- a/core/kotlinx-coroutines-core/src/Debug.kt
+++ b/core/kotlinx-coroutines-core/src/Debug.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
-import kotlin.coroutines.experimental.Continuation
+import kotlin.coroutines.Continuation
+import kotlinx.coroutines.internal.*
/**
* Name of the property that controls coroutine debugging. See [newCoroutineContext][CoroutineScope.newCoroutineContext].
diff --git a/core/kotlinx-coroutines-core/src/DefaultExecutor.kt b/core/kotlinx-coroutines-core/src/DefaultExecutor.kt
index cdec915..74ecc4f 100644
--- a/core/kotlinx-coroutines-core/src/DefaultExecutor.kt
+++ b/core/kotlinx-coroutines-core/src/DefaultExecutor.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import java.util.concurrent.*
+import kotlinx.coroutines.timeunit.*
internal actual val DefaultDelay: Delay = DefaultExecutor
diff --git a/core/kotlinx-coroutines-core/src/Dispatchers.kt b/core/kotlinx-coroutines-core/src/Dispatchers.kt
index a79a219..366c405 100644
--- a/core/kotlinx-coroutines-core/src/Dispatchers.kt
+++ b/core/kotlinx-coroutines-core/src/Dispatchers.kt
@@ -4,12 +4,11 @@
@file:Suppress("unused")
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
-import kotlinx.coroutines.experimental.scheduling.*
+import kotlinx.coroutines.internal.*
+import kotlinx.coroutines.scheduling.*
import java.util.*
-import kotlin.coroutines.experimental.*
/**
* Name of the property that defines the maximal number of threads that are used by [Dispatchers.IO] coroutines dispatcher.
@@ -71,7 +70,7 @@
*/
@JvmStatic
@ExperimentalCoroutinesApi
- public actual val Unconfined: CoroutineDispatcher = kotlinx.coroutines.experimental.Unconfined
+ public actual val Unconfined: CoroutineDispatcher = kotlinx.coroutines.Unconfined
/**
* The [CoroutineDispatcher] that is designed for offloading blocking IO tasks to a shared pool of threads.
diff --git a/core/kotlinx-coroutines-core/src/EventLoop.kt b/core/kotlinx-coroutines-core/src/EventLoop.kt
index 45af38c..edd9240 100644
--- a/core/kotlinx-coroutines-core/src/EventLoop.kt
+++ b/core/kotlinx-coroutines-core/src/EventLoop.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.internal.*
import java.util.concurrent.locks.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* Implemented by [CoroutineDispatcher] implementations that have event loop inside and can
diff --git a/core/kotlinx-coroutines-core/src/Exceptions.kt b/core/kotlinx-coroutines-core/src/Exceptions.kt
index 2622855..f8f7747 100644
--- a/core/kotlinx-coroutines-core/src/Exceptions.kt
+++ b/core/kotlinx-coroutines-core/src/Exceptions.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
/**
* This exception gets thrown if an exception is caught while processing [CompletionHandler] invocation for [Job].
diff --git a/core/kotlinx-coroutines-core/src/Executors.kt b/core/kotlinx-coroutines-core/src/Executors.kt
index 698649e..f59f959 100644
--- a/core/kotlinx-coroutines-core/src/Executors.kt
+++ b/core/kotlinx-coroutines-core/src/Executors.kt
@@ -2,13 +2,13 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.internal.*
import java.io.*
import java.io.Closeable
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* [CoroutineDispatcher] that has underlying [Executor] for dispatching tasks.
diff --git a/core/kotlinx-coroutines-core/src/Future.kt b/core/kotlinx-coroutines-core/src/Future.kt
index 398885f..0ecad87 100644
--- a/core/kotlinx-coroutines-core/src/Future.kt
+++ b/core/kotlinx-coroutines-core/src/Future.kt
@@ -5,7 +5,7 @@
@file:JvmMultifileClass
@file:JvmName("JobKt")
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/src/LazyDeferred.kt b/core/kotlinx-coroutines-core/src/LazyDeferred.kt
index ed2f06b..12769e0 100644
--- a/core/kotlinx-coroutines-core/src/LazyDeferred.kt
+++ b/core/kotlinx-coroutines-core/src/LazyDeferred.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* @suppress **Deprecated**: `Deferred` incorporates functionality of `LazyDeferred`. See [Deferred].
diff --git a/core/kotlinx-coroutines-core/src/Runnable.kt b/core/kotlinx-coroutines-core/src/Runnable.kt
index 2e23d5a..2acd554 100644
--- a/core/kotlinx-coroutines-core/src/Runnable.kt
+++ b/core/kotlinx-coroutines-core/src/Runnable.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
/**
* A runnable task for [CoroutineDispatcher.dispatch].
diff --git a/core/kotlinx-coroutines-core/src/ThreadContextElement.kt b/core/kotlinx-coroutines-core/src/ThreadContextElement.kt
index d1222df..4e1744a 100644
--- a/core/kotlinx-coroutines-core/src/ThreadContextElement.kt
+++ b/core/kotlinx-coroutines-core/src/ThreadContextElement.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.internal.*
+import kotlin.coroutines.*
/**
* Defines elements in [CoroutineContext] that are installed into thread context
diff --git a/core/kotlinx-coroutines-core/src/ThreadPoolDispatcher.kt b/core/kotlinx-coroutines-core/src/ThreadPoolDispatcher.kt
index 37f17b9..109efce 100644
--- a/core/kotlinx-coroutines-core/src/ThreadPoolDispatcher.kt
+++ b/core/kotlinx-coroutines-core/src/ThreadPoolDispatcher.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.internal.*
import java.util.concurrent.*
import java.util.concurrent.atomic.AtomicInteger
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* Creates a new coroutine execution context using a single thread with built-in [yield] support.
diff --git a/core/kotlinx-coroutines-core/src/TimeSource.kt b/core/kotlinx-coroutines-core/src/TimeSource.kt
index 7bda699..fec1a82 100644
--- a/core/kotlinx-coroutines-core/src/TimeSource.kt
+++ b/core/kotlinx-coroutines-core/src/TimeSource.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import java.util.concurrent.locks.LockSupport
diff --git a/core/kotlinx-coroutines-core/src/channels/Actor.kt b/core/kotlinx-coroutines-core/src/channels/Actor.kt
index abdc340..7321519 100644
--- a/core/kotlinx-coroutines-core/src/channels/Actor.kt
+++ b/core/kotlinx-coroutines-core/src/channels/Actor.kt
@@ -2,13 +2,16 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+@file:UseExperimental(ExperimentalTypeInference::class)
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.Channel.Factory.UNLIMITED
-import kotlinx.coroutines.experimental.intrinsics.*
-import kotlinx.coroutines.experimental.selects.*
-import kotlin.coroutines.experimental.*
+package kotlinx.coroutines.channels
+
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.Channel.Factory.UNLIMITED
+import kotlinx.coroutines.intrinsics.*
+import kotlinx.coroutines.selects.*
+import kotlin.coroutines.*
+import kotlin.experimental.*
/**
* Scope for [actor][GlobalScope.actor] coroutine builder.
@@ -115,6 +118,7 @@
* @param block the coroutine code.
*/
@ObsoleteCoroutinesApi
+@BuilderInference
public fun <E> CoroutineScope.actor(
context: CoroutineContext = EmptyCoroutineContext,
capacity: Int = 0,
@@ -140,7 +144,7 @@
@Deprecated(
message = "Standalone coroutine builders are deprecated, use extensions on CoroutineScope instead",
replaceWith = ReplaceWith("GlobalScope.actor(context, capacity, start, onCompletion, block)",
- imports = ["kotlinx.coroutines.experimental.GlobalScope", "kotlinx.coroutines.experimental.channels.actor"])
+ imports = ["kotlinx.coroutines.GlobalScope", "kotlinx.coroutines.channels.actor"])
)
public fun <E> actor(
context: CoroutineContext = Dispatchers.Default,
@@ -159,7 +163,7 @@
@Deprecated(
message = "Standalone coroutine builders are deprecated, use extensions on CoroutineScope instead",
replaceWith = ReplaceWith("GlobalScope.actor(context + parent, capacity, start, onCompletion, block)",
- imports = ["kotlinx.coroutines.experimental.GlobalScope", "kotlinx.coroutines.experimental.channels.actor"])
+ imports = ["kotlinx.coroutines.GlobalScope", "kotlinx.coroutines.channels.actor"])
)
public fun <E> actor(
context: CoroutineContext = Dispatchers.Default,
diff --git a/core/kotlinx-coroutines-core/src/channels/Channels.kt b/core/kotlinx-coroutines-core/src/channels/Channels.kt
index 507d4cf..78889e7 100644
--- a/core/kotlinx-coroutines-core/src/channels/Channels.kt
+++ b/core/kotlinx-coroutines-core/src/channels/Channels.kt
@@ -5,9 +5,9 @@
@file:JvmMultifileClass
@file:JvmName("ChannelsKt")
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
// -------- Operations on SendChannel --------
diff --git a/core/kotlinx-coroutines-core/src/channels/TickerChannels.kt b/core/kotlinx-coroutines-core/src/channels/TickerChannels.kt
index 6c2c4d5..1bd9512 100644
--- a/core/kotlinx-coroutines-core/src/channels/TickerChannels.kt
+++ b/core/kotlinx-coroutines-core/src/channels/TickerChannels.kt
@@ -2,11 +2,11 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.timeunit.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.timeunit.*
+import kotlin.coroutines.*
/**
* Mode for [ticker] function.
diff --git a/core/kotlinx-coroutines-core/src/internal/Annotations.kt b/core/kotlinx-coroutines-core/src/internal/Annotations.kt
index 1f293a3..756fbd4 100644
--- a/core/kotlinx-coroutines-core/src/internal/Annotations.kt
+++ b/core/kotlinx-coroutines-core/src/internal/Annotations.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
@Suppress("ACTUAL_WITHOUT_EXPECT")
internal actual typealias JvmName = kotlin.jvm.JvmName
diff --git a/core/kotlinx-coroutines-core/src/internal/ArrayCopy.kt b/core/kotlinx-coroutines-core/src/internal/ArrayCopy.kt
index bf0f7f1..f9196f3 100644
--- a/core/kotlinx-coroutines-core/src/internal/ArrayCopy.kt
+++ b/core/kotlinx-coroutines-core/src/internal/ArrayCopy.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
internal actual fun <E> arraycopy(
source: Array<E>,
diff --git a/core/kotlinx-coroutines-core/src/internal/Closeable.kt b/core/kotlinx-coroutines-core/src/internal/Closeable.kt
index 0786dd5..574045d 100644
--- a/core/kotlinx-coroutines-core/src/internal/Closeable.kt
+++ b/core/kotlinx-coroutines-core/src/internal/Closeable.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
/**
* Closeable entity.
diff --git a/core/kotlinx-coroutines-core/src/internal/Concurrent.kt b/core/kotlinx-coroutines-core/src/internal/Concurrent.kt
index 0c81733..e835d34 100644
--- a/core/kotlinx-coroutines-core/src/internal/Concurrent.kt
+++ b/core/kotlinx-coroutines-core/src/internal/Concurrent.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import java.lang.reflect.*
import java.util.*
diff --git a/core/kotlinx-coroutines-core/src/internal/LockFreeLinkedList.kt b/core/kotlinx-coroutines-core/src/internal/LockFreeLinkedList.kt
index 2cb1d68..27027f2 100644
--- a/core/kotlinx-coroutines-core/src/internal/LockFreeLinkedList.kt
+++ b/core/kotlinx-coroutines-core/src/internal/LockFreeLinkedList.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
private typealias Node = LockFreeLinkedListNode
@@ -540,7 +540,7 @@
/**
* Finds the head of the list (implementing [LockFreeLinkedListHead]) by following [next] pointers.
*
- * The code in [kotlinx.coroutines.experimental.JobSupport] performs upgrade of a single node to a list.
+ * The code in [kotlinx.coroutines.JobSupport] performs upgrade of a single node to a list.
* It uses [addOneIfEmpty] to add the list head to "empty list of a single node" once.
* During upgrade a transient state of the list looks like this:
*
diff --git a/core/kotlinx-coroutines-core/src/internal/LockFreeMPMCQueue.kt b/core/kotlinx-coroutines-core/src/internal/LockFreeMPMCQueue.kt
index 738e21b..35b1e5f 100644
--- a/core/kotlinx-coroutines-core/src/internal/LockFreeMPMCQueue.kt
+++ b/core/kotlinx-coroutines-core/src/internal/LockFreeMPMCQueue.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import kotlinx.atomicfu.*
diff --git a/core/kotlinx-coroutines-core/src/internal/LockFreeMPSCQueue.kt b/core/kotlinx-coroutines-core/src/internal/LockFreeMPSCQueue.kt
index 7eff402..9234f2e 100644
--- a/core/kotlinx-coroutines-core/src/internal/LockFreeMPSCQueue.kt
+++ b/core/kotlinx-coroutines-core/src/internal/LockFreeMPSCQueue.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import java.util.concurrent.atomic.*
private typealias Core<E> = LockFreeMPSCQueueCore<E>
diff --git a/core/kotlinx-coroutines-core/src/internal/Synchronized.kt b/core/kotlinx-coroutines-core/src/internal/Synchronized.kt
index e10261a..5407ade 100644
--- a/core/kotlinx-coroutines-core/src/internal/Synchronized.kt
+++ b/core/kotlinx-coroutines-core/src/internal/Synchronized.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
@Suppress("ACTUAL_WITHOUT_EXPECT") // visibility
internal actual typealias SynchronizedObject = Any
diff --git a/core/kotlinx-coroutines-core/src/internal/SystemProps.kt b/core/kotlinx-coroutines-core/src/internal/SystemProps.kt
index 04639e7..cbef51f 100644
--- a/core/kotlinx-coroutines-core/src/internal/SystemProps.kt
+++ b/core/kotlinx-coroutines-core/src/internal/SystemProps.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
// number of processors at startup for consistent prop initialization
internal val AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors()
diff --git a/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt b/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt
index a8ab6da..c2d1663 100644
--- a/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt
+++ b/core/kotlinx-coroutines-core/src/internal/ThreadContext.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
private val ZERO = Symbol("ZERO")
diff --git a/core/kotlinx-coroutines-core/src/internal/ThreadSafeHeap.kt b/core/kotlinx-coroutines-core/src/internal/ThreadSafeHeap.kt
index a9583eb..fbf19e1 100644
--- a/core/kotlinx-coroutines-core/src/internal/ThreadSafeHeap.kt
+++ b/core/kotlinx-coroutines-core/src/internal/ThreadSafeHeap.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import java.util.*
/**
diff --git a/core/kotlinx-coroutines-core/src/scheduling/CoroutineScheduler.kt b/core/kotlinx-coroutines-core/src/scheduling/CoroutineScheduler.kt
index 4d4447d..ca446ed 100644
--- a/core/kotlinx-coroutines-core/src/scheduling/CoroutineScheduler.kt
+++ b/core/kotlinx-coroutines-core/src/scheduling/CoroutineScheduler.kt
@@ -2,11 +2,11 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.internal.*
import java.io.Closeable
import java.util.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/src/scheduling/Dispatcher.kt b/core/kotlinx-coroutines-core/src/scheduling/Dispatcher.kt
index 771dabf..68d8948 100644
--- a/core/kotlinx-coroutines-core/src/scheduling/Dispatcher.kt
+++ b/core/kotlinx-coroutines-core/src/scheduling/Dispatcher.kt
@@ -2,14 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.internal.*
import java.lang.UnsupportedOperationException
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* Default instance of coroutine dispatcher.
diff --git a/core/kotlinx-coroutines-core/src/scheduling/Tasks.kt b/core/kotlinx-coroutines-core/src/scheduling/Tasks.kt
index bf0b1dc..993e355 100644
--- a/core/kotlinx-coroutines-core/src/scheduling/Tasks.kt
+++ b/core/kotlinx-coroutines-core/src/scheduling/Tasks.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.internal.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/src/scheduling/WorkQueue.kt b/core/kotlinx-coroutines-core/src/scheduling/WorkQueue.kt
index d097f18..2a41d21 100644
--- a/core/kotlinx-coroutines-core/src/scheduling/WorkQueue.kt
+++ b/core/kotlinx-coroutines-core/src/scheduling/WorkQueue.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
import kotlinx.atomicfu.*
import java.util.concurrent.atomic.*
diff --git a/core/kotlinx-coroutines-core/src/test_/TestCoroutineContext.kt b/core/kotlinx-coroutines-core/src/test_/TestCoroutineContext.kt
index 70dc0f1..5bcc39f 100644
--- a/core/kotlinx-coroutines-core/src/test_/TestCoroutineContext.kt
+++ b/core/kotlinx-coroutines-core/src/test_/TestCoroutineContext.kt
@@ -2,13 +2,13 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.test
+package kotlinx.coroutines.test
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.CancellationException
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.CancellationException
+import kotlinx.coroutines.internal.*
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
/**
* This [CoroutineContext] dispatcher can be used to simulate virtual time to speed up
diff --git a/core/kotlinx-coroutines-core/src/timeunit/TimeUnit.kt b/core/kotlinx-coroutines-core/src/timeunit/TimeUnit.kt
index e8bf546..471b6d5 100644
--- a/core/kotlinx-coroutines-core/src/timeunit/TimeUnit.kt
+++ b/core/kotlinx-coroutines-core/src/timeunit/TimeUnit.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.timeunit
+package kotlinx.coroutines.timeunit
/**
* Time unit type alias for writing multiplatform code.
diff --git a/core/kotlinx-coroutines-core/test/AsyncJvmTest.kt b/core/kotlinx-coroutines-core/test/AsyncJvmTest.kt
index f5bcba7..bd1f263 100644
--- a/core/kotlinx-coroutines-core/test/AsyncJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/AsyncJvmTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/AtomicCancellationTest.kt b/core/kotlinx-coroutines-core/test/AtomicCancellationTest.kt
index c2292f7..351ddb4 100644
--- a/core/kotlinx-coroutines-core/test/AtomicCancellationTest.kt
+++ b/core/kotlinx-coroutines-core/test/AtomicCancellationTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.selects.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.selects.*
import kotlin.test.*
class AtomicCancellationTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/AwaitJvmTest.kt b/core/kotlinx-coroutines-core/test/AwaitJvmTest.kt
index b52c4ca..a04c8c8 100644
--- a/core/kotlinx-coroutines-core/test/AwaitJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/AwaitJvmTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
diff --git a/core/kotlinx-coroutines-core/test/AwaitStressTest.kt b/core/kotlinx-coroutines-core/test/AwaitStressTest.kt
index a50ccd0..f86cdda 100644
--- a/core/kotlinx-coroutines-core/test/AwaitStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/AwaitStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
import org.junit.Test
diff --git a/core/kotlinx-coroutines-core/test/CommonPoolTest.kt b/core/kotlinx-coroutines-core/test/CommonPoolTest.kt
index 99d5bab..147fe38 100644
--- a/core/kotlinx-coroutines-core/test/CommonPoolTest.kt
+++ b/core/kotlinx-coroutines-core/test/CommonPoolTest.kt
@@ -2,8 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Assert.*
import java.lang.reflect.*
diff --git a/core/kotlinx-coroutines-core/test/ContinuationSerializationTest.kt b/core/kotlinx-coroutines-core/test/ContinuationSerializationTest.kt
new file mode 100644
index 0000000..12941fb
--- /dev/null
+++ b/core/kotlinx-coroutines-core/test/ContinuationSerializationTest.kt
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
+ */
+
+package kotlinx.coroutines
+
+
+import com.esotericsoftware.kryo.*
+import com.esotericsoftware.kryo.io.*
+import kotlinx.atomicfu.*
+import org.junit.Test
+import org.objenesis.strategy.*
+import java.io.*
+import kotlin.coroutines.*
+import kotlin.coroutines.intrinsics.*
+import kotlin.reflect.*
+import kotlin.test.*
+
+@Ignore
+class ContinuationSerializationTest : TestBase() {
+
+ companion object {
+ @JvmStatic
+ var flag = false
+ }
+
+// private val atomicInt = atomic(1)
+
+ private val kryo =
+ Kryo().also { it.instantiatorStrategy = Kryo.DefaultInstantiatorStrategy(StdInstantiatorStrategy()) }
+
+ private var storage: ByteArrayOutputStream = ByteArrayOutputStream()
+
+ @Test
+ fun testSafeContinuationSerDe() = testSerization(::serialize, {
+ it.javaClass.getDeclaredField("result").apply {
+ isAccessible = true
+ set(it, COROUTINE_SUSPENDED)
+ }
+ })
+
+ @Test
+ fun testUnsafeContinuationSerDe() = testSerization(::serializeUnsafe, {})
+
+// @Test
+// fun testCancellableContinuationSerDe() = testSerization(::serializeCancellable, {
+// it.javaClass.superclass.getDeclaredField("_decision").apply {
+// isAccessible = true
+// set(it, atomicInt)
+// }
+// })
+
+ private suspend fun serialize() = suspendCoroutine<Unit> { cont ->
+ Output(storage).use {
+ kryo.writeClassAndObject(it, cont)
+ }
+ }
+
+ private suspend fun serializeCancellable() = suspendCancellableCoroutine<Unit> { cont ->
+ Output(storage).use {
+ kryo.writeClassAndObject(it, cont)
+ }
+ }
+
+ private suspend fun serializeUnsafe() = suspendCoroutineUninterceptedOrReturn<Unit> { cont ->
+ Output(storage).use {
+ kryo.writeClassAndObject(it, cont)
+ }
+ }
+
+ private fun testSerization(serialize: KSuspendFunction0<Unit>, patcher: (Continuation<Unit>) -> Unit) =
+ runBlocking {
+ launch(Unconfined) {
+ expect(1)
+ serialize()
+ flag = true
+ }
+
+ val cont = deserialise()
+ patcher(cont)
+ expect(2)
+ cont.resume(Unit)
+ finish(3)
+ assertTrue(flag)
+ }
+
+ @Suppress("UNCHECKED_CAST")
+ private fun deserialise(): Continuation<Unit> {
+ val input = Input(ByteArrayInputStream(storage.toByteArray()))
+ input.use {
+ return kryo.readClassAndObject(it) as Continuation<Unit>
+ }
+ }
+}
diff --git a/core/kotlinx-coroutines-core/test/CoroutinesJvmTest.kt b/core/kotlinx-coroutines-core/test/CoroutinesJvmTest.kt
index ba8bf1e..4433fb6 100644
--- a/core/kotlinx-coroutines-core/test/CoroutinesJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/CoroutinesJvmTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/DebugThreadNameTest.kt b/core/kotlinx-coroutines-core/test/DebugThreadNameTest.kt
index 06f9f4b..9d68396 100644
--- a/core/kotlinx-coroutines-core/test/DebugThreadNameTest.kt
+++ b/core/kotlinx-coroutines-core/test/DebugThreadNameTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/DefaultExecutorStressTest.kt b/core/kotlinx-coroutines-core/test/DefaultExecutorStressTest.kt
index 05efec2..b4c6aae 100644
--- a/core/kotlinx-coroutines-core/test/DefaultExecutorStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/DefaultExecutorStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
diff --git a/core/kotlinx-coroutines-core/test/DelayJvmTest.kt b/core/kotlinx-coroutines-core/test/DelayJvmTest.kt
index a8d2515..642e504 100644
--- a/core/kotlinx-coroutines-core/test/DelayJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/DelayJvmTest.kt
@@ -2,13 +2,13 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.hamcrest.MatcherAssert.*
import org.hamcrest.core.*
import org.junit.*
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
class DelayJvmTest : TestBase() {
/**
@@ -65,13 +65,8 @@
override val context: CoroutineContext
get() = cont.context
- override fun resume(value: T) {
- pool.execute { cont.resume(value) }
- }
-
- override fun resumeWithException(exception: Throwable) {
- pool.execute { cont.resumeWithException(exception) }
+ override fun resumeWith(result: Result<T>) {
+ pool.execute { cont.resumeWith(result) }
}
}
-
}
\ No newline at end of file
diff --git a/core/kotlinx-coroutines-core/test/ExecutorsTest.kt b/core/kotlinx-coroutines-core/test/ExecutorsTest.kt
index 6d98bd6..a959b4e 100644
--- a/core/kotlinx-coroutines-core/test/ExecutorsTest.kt
+++ b/core/kotlinx-coroutines-core/test/ExecutorsTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.Test
import java.util.concurrent.Executors
diff --git a/core/kotlinx-coroutines-core/test/IODispatcherTest.kt b/core/kotlinx-coroutines-core/test/IODispatcherTest.kt
index e0487c2..fe3c71a 100644
--- a/core/kotlinx-coroutines-core/test/IODispatcherTest.kt
+++ b/core/kotlinx-coroutines-core/test/IODispatcherTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.Test
import kotlin.test.*
@@ -17,6 +17,7 @@
expect(2)
assertNotSame(mainThread, Thread.currentThread())
}
+
expect(3)
assertSame(mainThread, Thread.currentThread())
finish(4)
diff --git a/core/kotlinx-coroutines-core/test/JobActivationStressTest.kt b/core/kotlinx-coroutines-core/test/JobActivationStressTest.kt
index 01b9a8b..3ea8faf 100644
--- a/core/kotlinx-coroutines-core/test/JobActivationStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/JobActivationStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
import org.junit.Test
diff --git a/core/kotlinx-coroutines-core/test/JobChildStressTest.kt b/core/kotlinx-coroutines-core/test/JobChildStressTest.kt
index fca7ff6..e32b222 100644
--- a/core/kotlinx-coroutines-core/test/JobChildStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/JobChildStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
import org.junit.Test
diff --git a/core/kotlinx-coroutines-core/test/JobDisposeStressTest.kt b/core/kotlinx-coroutines-core/test/JobDisposeStressTest.kt
index af0a42c..ea05790 100644
--- a/core/kotlinx-coroutines-core/test/JobDisposeStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/JobDisposeStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.Test
import kotlin.concurrent.thread
diff --git a/core/kotlinx-coroutines-core/test/JobHandlersUpgradeStressTest.kt b/core/kotlinx-coroutines-core/test/JobHandlersUpgradeStressTest.kt
index 73711f4..852aa2a 100644
--- a/core/kotlinx-coroutines-core/test/JobHandlersUpgradeStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/JobHandlersUpgradeStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlinx.atomicfu.*
import java.util.*
diff --git a/core/kotlinx-coroutines-core/test/JobStressTest.kt b/core/kotlinx-coroutines-core/test/JobStressTest.kt
index e49a152..2decb3d 100644
--- a/core/kotlinx-coroutines-core/test/JobStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/JobStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/JoinStressTest.kt b/core/kotlinx-coroutines-core/test/JoinStressTest.kt
index b405561..22f169f 100644
--- a/core/kotlinx-coroutines-core/test/JoinStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/JoinStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
import org.junit.Test
diff --git a/core/kotlinx-coroutines-core/test/RunBlockingTest.kt b/core/kotlinx-coroutines-core/test/RunBlockingTest.kt
index 02b1002..6f4249c 100644
--- a/core/kotlinx-coroutines-core/test/RunBlockingTest.kt
+++ b/core/kotlinx-coroutines-core/test/RunBlockingTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
class RunBlockingTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/TestBase.kt b/core/kotlinx-coroutines-core/test/TestBase.kt
index e92afea..56e0539 100644
--- a/core/kotlinx-coroutines-core/test/TestBase.kt
+++ b/core/kotlinx-coroutines-core/test/TestBase.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.internal.*
-import kotlinx.coroutines.experimental.scheduling.*
+import kotlinx.coroutines.internal.*
+import kotlinx.coroutines.scheduling.*
import org.junit.*
import java.util.concurrent.atomic.*
diff --git a/core/kotlinx-coroutines-core/test/TestBaseTest.kt b/core/kotlinx-coroutines-core/test/TestBaseTest.kt
index 5e0d88a..b198102 100644
--- a/core/kotlinx-coroutines-core/test/TestBaseTest.kt
+++ b/core/kotlinx-coroutines-core/test/TestBaseTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
diff --git a/core/kotlinx-coroutines-core/test/TestSecurityManager.kt b/core/kotlinx-coroutines-core/test/TestSecurityManager.kt
index f5280f0..e7b039c 100644
--- a/core/kotlinx-coroutines-core/test/TestSecurityManager.kt
+++ b/core/kotlinx-coroutines-core/test/TestSecurityManager.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import java.security.Permission
diff --git a/core/kotlinx-coroutines-core/test/ThreadContextElementTest.kt b/core/kotlinx-coroutines-core/test/ThreadContextElementTest.kt
index 223abcc..ea43c7a 100644
--- a/core/kotlinx-coroutines-core/test/ThreadContextElementTest.kt
+++ b/core/kotlinx-coroutines-core/test/ThreadContextElementTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.Test
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
class ThreadContextElementTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt b/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt
index 46b2ace..62a340e 100644
--- a/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt
+++ b/core/kotlinx-coroutines-core/test/ThreadLocalTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.*
import org.junit.Test
@@ -173,7 +173,7 @@
val data = 42
GlobalScope.async(Dispatchers.Default + intThreadLocal.asContextElement(42)) {
- assertSame(data, intThreadLocal.get())
+ assertEquals(data, intThreadLocal.get())
expect(2)
GlobalScope.async(it + intThreadLocal.asContextElement(31)) {
@@ -182,7 +182,7 @@
}.await()
withContext(it + intThreadLocal.asContextElement(2)) {
- assertSame(2, intThreadLocal.get())
+ assertEquals(2, intThreadLocal.get())
expect(4)
}
diff --git a/core/kotlinx-coroutines-core/test/Threads.kt b/core/kotlinx-coroutines-core/test/Threads.kt
index ca69586..1d52dc6 100644
--- a/core/kotlinx-coroutines-core/test/Threads.kt
+++ b/core/kotlinx-coroutines-core/test/Threads.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
private const val WAIT_LOST_THREADS = 10_000L // 10s
private val ignoreLostThreads = mutableSetOf<String>()
diff --git a/core/kotlinx-coroutines-core/test/VirtualTimeSource.kt b/core/kotlinx-coroutines-core/test/VirtualTimeSource.kt
index bd9fe03..91fb5d9 100644
--- a/core/kotlinx-coroutines-core/test/VirtualTimeSource.kt
+++ b/core/kotlinx-coroutines-core/test/VirtualTimeSource.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import java.io.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt b/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt
index 3cd0906..0cad285 100644
--- a/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt
+++ b/core/kotlinx-coroutines-core/test/WithDefaultContextTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/WithTimeoutChildDipspatchStressTest.kt b/core/kotlinx-coroutines-core/test/WithTimeoutChildDipspatchStressTest.kt
index 2976478..4d440a7 100644
--- a/core/kotlinx-coroutines-core/test/WithTimeoutChildDipspatchStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/WithTimeoutChildDipspatchStressTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import org.junit.Test
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/WithTimeoutOrNullJvmTest.kt b/core/kotlinx-coroutines-core/test/WithTimeoutOrNullJvmTest.kt
index d8fd592..8b91e26 100644
--- a/core/kotlinx-coroutines-core/test/WithTimeoutOrNullJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/WithTimeoutOrNullJvmTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/WithTimeoutOrNullThreadDispatchTest.kt b/core/kotlinx-coroutines-core/test/WithTimeoutOrNullThreadDispatchTest.kt
index 8ff7dcb..5d8c022 100644
--- a/core/kotlinx-coroutines-core/test/WithTimeoutOrNullThreadDispatchTest.kt
+++ b/core/kotlinx-coroutines-core/test/WithTimeoutOrNullThreadDispatchTest.kt
@@ -2,14 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.concurrent.ThreadFactory
import java.util.concurrent.atomic.AtomicInteger
-import kotlin.coroutines.experimental.CoroutineContext
+import kotlin.coroutines.CoroutineContext
class WithTimeoutOrNullThreadDispatchTest : TestBase() {
var executor: ExecutorService? = null
diff --git a/core/kotlinx-coroutines-core/test/WithTimeoutThreadDispatchTest.kt b/core/kotlinx-coroutines-core/test/WithTimeoutThreadDispatchTest.kt
index 84c6903..82f5e92 100644
--- a/core/kotlinx-coroutines-core/test/WithTimeoutThreadDispatchTest.kt
+++ b/core/kotlinx-coroutines-core/test/WithTimeoutThreadDispatchTest.kt
@@ -2,14 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import kotlin.test.*
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.concurrent.ThreadFactory
import java.util.concurrent.atomic.AtomicInteger
-import kotlin.coroutines.experimental.CoroutineContext
+import kotlin.coroutines.CoroutineContext
class WithTimeoutThreadDispatchTest : TestBase() {
var executor: ExecutorService? = null
diff --git a/core/kotlinx-coroutines-core/test/channels/ActorLazyTest.kt b/core/kotlinx-coroutines-core/test/channels/ActorLazyTest.kt
index 6152cf0..9a04440 100644
--- a/core/kotlinx-coroutines-core/test/channels/ActorLazyTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ActorLazyTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.hamcrest.core.*
import org.junit.*
import org.junit.Assert.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ActorTest.kt b/core/kotlinx-coroutines-core/test/channels/ActorTest.kt
index 478d95e..db08ddb 100644
--- a/core/kotlinx-coroutines-core/test/channels/ActorTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ActorTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.hamcrest.core.*
import org.junit.*
import org.junit.Assert.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ArrayChannelStressTest.kt b/core/kotlinx-coroutines-core/test/channels/ArrayChannelStressTest.kt
index ad5014b..ccb0e87 100644
--- a/core/kotlinx-coroutines-core/test/channels/ArrayChannelStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ArrayChannelStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.runner.*
import org.junit.runners.*
@@ -22,13 +22,13 @@
fun testStress() = runTest {
val n = 100_000 * stressTestMultiplier
val q = Channel<Int>(capacity)
- val sender = launch(kotlin.coroutines.experimental.coroutineContext) {
+ val sender = launch(coroutineContext) {
for (i in 1..n) {
q.send(i)
}
expect(2)
}
- val receiver = launch(kotlin.coroutines.experimental.coroutineContext) {
+ val receiver = launch(coroutineContext) {
for (i in 1..n) {
val next = q.receive()
check(next == i)
diff --git a/core/kotlinx-coroutines-core/test/channels/BroadcastChannelMultiReceiveStressTest.kt b/core/kotlinx-coroutines-core/test/channels/BroadcastChannelMultiReceiveStressTest.kt
index 83937c5..54ba7b6 100644
--- a/core/kotlinx-coroutines-core/test/channels/BroadcastChannelMultiReceiveStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/BroadcastChannelMultiReceiveStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.selects.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.selects.*
import org.junit.*
import org.junit.runner.*
import org.junit.runners.*
diff --git a/core/kotlinx-coroutines-core/test/channels/BroadcastChannelSubStressTest.kt b/core/kotlinx-coroutines-core/test/channels/BroadcastChannelSubStressTest.kt
index a542aef..221120a 100644
--- a/core/kotlinx-coroutines-core/test/channels/BroadcastChannelSubStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/BroadcastChannelSubStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.runner.*
import org.junit.runners.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelAtomicCancelStressTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelAtomicCancelStressTest.kt
index 72f9bf4..7d935e1 100644
--- a/core/kotlinx-coroutines-core/test/channels/ChannelAtomicCancelStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ChannelAtomicCancelStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.selects.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.selects.*
import org.junit.*
import org.junit.Assert.*
import org.junit.runner.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelIsClosedLinearizabilityTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelIsClosedLinearizabilityTest.kt
index 204dafb..70f5481 100644
--- a/core/kotlinx-coroutines-core/test/channels/ChannelIsClosedLinearizabilityTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ChannelIsClosedLinearizabilityTest.kt
@@ -1,16 +1,15 @@
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-
@file:Suppress("unused")
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
import com.devexperts.dxlab.lincheck.*
import com.devexperts.dxlab.lincheck.annotations.*
import com.devexperts.dxlab.lincheck.paramgen.*
import com.devexperts.dxlab.lincheck.stress.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.io.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt
index 40eee20..9f02767 100644
--- a/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ChannelLinearizabilityTest.kt
@@ -1,16 +1,15 @@
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-
@file:Suppress("unused")
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
import com.devexperts.dxlab.lincheck.*
import com.devexperts.dxlab.lincheck.annotations.*
import com.devexperts.dxlab.lincheck.paramgen.*
import com.devexperts.dxlab.lincheck.stress.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.io.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelSendReceiveStressTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelSendReceiveStressTest.kt
index c00e60f..1bd6060 100644
--- a/core/kotlinx-coroutines-core/test/channels/ChannelSendReceiveStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ChannelSendReceiveStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.selects.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.selects.*
import org.junit.*
import org.junit.Assert.*
import org.junit.runner.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelsConsumeTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelsConsumeTest.kt
index 30bd1b3..042f0dd 100644
--- a/core/kotlinx-coroutines-core/test/channels/ChannelsConsumeTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ChannelsConsumeTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
import kotlin.test.*
/**
diff --git a/core/kotlinx-coroutines-core/test/channels/ChannelsJvmTest.kt b/core/kotlinx-coroutines-core/test/channels/ChannelsJvmTest.kt
index 2ccd77e..7613f04 100644
--- a/core/kotlinx-coroutines-core/test/channels/ChannelsJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ChannelsJvmTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ConflatedBroadcastChannelNotifyStressTest.kt b/core/kotlinx-coroutines-core/test/channels/ConflatedBroadcastChannelNotifyStressTest.kt
index 2ec11eb..4d09e37 100644
--- a/core/kotlinx-coroutines-core/test/channels/ConflatedBroadcastChannelNotifyStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ConflatedBroadcastChannelNotifyStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.core.*
import org.junit.*
diff --git a/core/kotlinx-coroutines-core/test/channels/ConflatedChannelCloseStressTest.kt b/core/kotlinx-coroutines-core/test/channels/ConflatedChannelCloseStressTest.kt
index d031e51..316b378 100644
--- a/core/kotlinx-coroutines-core/test/channels/ConflatedChannelCloseStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ConflatedChannelCloseStressTest.kt
@@ -2,11 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import org.junit.*
-import java.util.concurrent.atomic.*
+import kotlinx.coroutines.*
+import org.junit.After
+import org.junit.Test
+import java.util.concurrent.atomic.AtomicInteger
+import java.util.concurrent.atomic.AtomicReference
+import kotlin.coroutines.*
class ConflatedChannelCloseStressTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/channels/DoubleChannelCloseStressTest.kt b/core/kotlinx-coroutines-core/test/channels/DoubleChannelCloseStressTest.kt
index a40e264..3c9af50 100644
--- a/core/kotlinx-coroutines-core/test/channels/DoubleChannelCloseStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/DoubleChannelCloseStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
class DoubleChannelCloseStressTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt b/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt
index 7203f1f..864a0b4 100644
--- a/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/InvokeOnCloseStressTest.kt
@@ -2,14 +2,15 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
import org.junit.*
import org.junit.Test
import java.util.concurrent.*
import java.util.concurrent.atomic.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
class InvokeOnCloseStressTest : TestBase(), CoroutineScope {
diff --git a/core/kotlinx-coroutines-core/test/channels/ProduceConsumeJvmTest.kt b/core/kotlinx-coroutines-core/test/channels/ProduceConsumeJvmTest.kt
index d1cde33..1ae62d8 100644
--- a/core/kotlinx-coroutines-core/test/channels/ProduceConsumeJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/ProduceConsumeJvmTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Assert.*
import org.junit.runner.*
diff --git a/core/kotlinx-coroutines-core/test/channels/RandevouzChannelStressTest.kt b/core/kotlinx-coroutines-core/test/channels/RandevouzChannelStressTest.kt
index 2558c29..a054175 100644
--- a/core/kotlinx-coroutines-core/test/channels/RandevouzChannelStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/RandevouzChannelStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
class RandevouzChannelStressTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/channels/SendReceiveJvmStressTest.kt b/core/kotlinx-coroutines-core/test/channels/SendReceiveJvmStressTest.kt
index c1ed2b3..60d1adb 100644
--- a/core/kotlinx-coroutines-core/test/channels/SendReceiveJvmStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/SendReceiveJvmStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.runner.*
import org.junit.runners.*
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/channels/SimpleSendReceiveJvmTest.kt b/core/kotlinx-coroutines-core/test/channels/SimpleSendReceiveJvmTest.kt
index ceb630c..54023a3 100644
--- a/core/kotlinx-coroutines-core/test/channels/SimpleSendReceiveJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/SimpleSendReceiveJvmTest.kt
@@ -2,14 +2,15 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.hamcrest.core.*
import org.junit.*
import org.junit.Assert.*
import org.junit.runner.*
import org.junit.runners.*
+import kotlin.coroutines.*
@RunWith(Parameterized::class)
class SimpleSendReceiveJvmTest(
diff --git a/core/kotlinx-coroutines-core/test/channels/TickerChannelCommonTest.kt b/core/kotlinx-coroutines-core/test/channels/TickerChannelCommonTest.kt
index 9ad8ae3..392d982 100644
--- a/core/kotlinx-coroutines-core/test/channels/TickerChannelCommonTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/TickerChannelCommonTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.selects.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.selects.*
import org.junit.Test
import org.junit.runner.*
import org.junit.runners.*
diff --git a/core/kotlinx-coroutines-core/test/channels/TickerChannelTest.kt b/core/kotlinx-coroutines-core/test/channels/TickerChannelTest.kt
index 37c1c6e..c421bd3 100644
--- a/core/kotlinx-coroutines-core/test/channels/TickerChannelTest.kt
+++ b/core/kotlinx-coroutines-core/test/channels/TickerChannelTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
class TickerChannelTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/exceptions/CoroutineExceptionHandlerJvmTest.kt b/core/kotlinx-coroutines-core/test/exceptions/CoroutineExceptionHandlerJvmTest.kt
index ab95879..c4edde9 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/CoroutineExceptionHandlerJvmTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/CoroutineExceptionHandlerJvmTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Test
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/exceptions/Exceptions.kt b/core/kotlinx-coroutines-core/test/exceptions/Exceptions.kt
index 1097117..53c7680 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/Exceptions.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/Exceptions.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import java.io.*
import java.util.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
/**
diff --git a/core/kotlinx-coroutines-core/test/exceptions/JobBasicCancellationTest.kt b/core/kotlinx-coroutines-core/test/exceptions/JobBasicCancellationTest.kt
index a408420..270620f 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/JobBasicCancellationTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/JobBasicCancellationTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
import java.io.*
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/exceptions/JobExceptionHandlingTest.kt b/core/kotlinx-coroutines-core/test/exceptions/JobExceptionHandlingTest.kt
index 3722860..b6bc6b1 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/JobExceptionHandlingTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/JobExceptionHandlingTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.CoroutineStart.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.CoroutineStart.*
import org.junit.Test
import java.io.*
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/exceptions/JobExceptionsStressTest.kt b/core/kotlinx-coroutines-core/test/exceptions/JobExceptionsStressTest.kt
index 90aa7e9..20ddb98 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/JobExceptionsStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/JobExceptionsStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Test
import java.io.*
diff --git a/core/kotlinx-coroutines-core/test/exceptions/JobNestedExceptionsTest.kt b/core/kotlinx-coroutines-core/test/exceptions/JobNestedExceptionsTest.kt
index 0dd8ce9..a2fa59e 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/JobNestedExceptionsTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/JobNestedExceptionsTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
import java.io.*
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/exceptions/ProduceExceptionsTest.kt b/core/kotlinx-coroutines-core/test/exceptions/ProduceExceptionsTest.kt
index 0662c33..17dbbd0 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/ProduceExceptionsTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/ProduceExceptionsTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
import org.junit.Test
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/exceptions/SuppresionTests.kt b/core/kotlinx-coroutines-core/test/exceptions/SuppresionTests.kt
index 4b60bd2..ed021b5 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/SuppresionTests.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/SuppresionTests.kt
@@ -2,10 +2,13 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.exceptions.*
+import kotlinx.coroutines.selects.*
import java.io.*
+import kotlin.coroutines.*
import kotlin.test.*
/*
@@ -34,7 +37,7 @@
@Test
fun testNotificationsWithException() = runTest {
expect(1)
- val coroutineContext = kotlin.coroutines.experimental.coroutineContext // workaround for KT-22984
+ val coroutineContext = kotlin.coroutines.coroutineContext // workaround for KT-22984
val coroutine = object : AbstractCoroutine<String>(coroutineContext, false) {
override fun onStart() {
expect(3)
diff --git a/core/kotlinx-coroutines-core/test/exceptions/WithContextCancellationStressTest.kt b/core/kotlinx-coroutines-core/test/exceptions/WithContextCancellationStressTest.kt
index 67135d8..cff37a3 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/WithContextCancellationStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/WithContextCancellationStressTest.kt
@@ -2,14 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Test
import java.io.*
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
class WithContextCancellationStressTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/exceptions/WithContextExceptionHandlingTest.kt b/core/kotlinx-coroutines-core/test/exceptions/WithContextExceptionHandlingTest.kt
index 5b1efec..46f04b0 100644
--- a/core/kotlinx-coroutines-core/test/exceptions/WithContextExceptionHandlingTest.kt
+++ b/core/kotlinx-coroutines-core/test/exceptions/WithContextExceptionHandlingTest.kt
@@ -2,14 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.exceptions
+package kotlinx.coroutines.exceptions
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
import org.junit.runner.*
import org.junit.runners.*
import java.io.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
@RunWith(Parameterized::class)
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-01.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-01.kt
index 65b01b9..3cad864 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-01.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic01
+package kotlinx.coroutines.guide.basic01
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) {
GlobalScope.launch { // launch new coroutine in background and continue
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-02.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-02.kt
index 53cc884..c85e254 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-02.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic02
+package kotlinx.coroutines.guide.basic02
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) {
GlobalScope.launch { // launch new coroutine in background and continue
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-02b.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-02b.kt
index fdaac97..f7c092d 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-02b.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-02b.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic02b
+package kotlinx.coroutines.guide.basic02b
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking { // start main coroutine
GlobalScope.launch { // launch new coroutine in background and continue
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-03.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-03.kt
index 00af13d..f153890 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-03.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic03
+package kotlinx.coroutines.guide.basic03
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val job = GlobalScope.launch { // launch new coroutine and keep a reference to its Job
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-03s.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-03s.kt
index 199237e..b9b6aa2 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-03s.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-03s.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic03s
+package kotlinx.coroutines.guide.basic03s
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking { // this: CoroutineScope
launch { // launch new coroutine in the scope of runBlocking
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-04.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-04.kt
index 00483a2..76ca19b 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-04.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic04
+package kotlinx.coroutines.guide.basic04
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking { // this: CoroutineScope
launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-05.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-05.kt
index 6d25eca..06067f1 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-05.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic05
+package kotlinx.coroutines.guide.basic05
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
launch { doWorld() }
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-05s.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-05s.kt
index 62f5d71..578a28e 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-05s.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-05s.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic05s
+package kotlinx.coroutines.guide.basic05s
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
launchDoWorld()
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-06.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-06.kt
index 8182934..2f351b4 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-06.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic06
+package kotlinx.coroutines.guide.basic06
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
repeat(100_000) { // launch a lot of coroutines
diff --git a/core/kotlinx-coroutines-core/test/guide/example-basic-07.kt b/core/kotlinx-coroutines-core/test/guide/example-basic-07.kt
index 829e7b9..8df75bc 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-basic-07.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-basic-07.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.basic07
+package kotlinx.coroutines.guide.basic07
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
GlobalScope.launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-01.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-01.kt
index 5862235..9288873 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-01.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel01
+package kotlinx.coroutines.guide.cancel01
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val job = launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-02.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-02.kt
index 77206eb..1d3c82d 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-02.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel02
+package kotlinx.coroutines.guide.cancel02
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val startTime = timeSource.currentTimeMillis()
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-03.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-03.kt
index ff97f75..3d98efc 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-03.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel03
+package kotlinx.coroutines.guide.cancel03
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val startTime = timeSource.currentTimeMillis()
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-04.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-04.kt
index 8533d50..2001e41 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-04.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel04
+package kotlinx.coroutines.guide.cancel04
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val job = launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-05.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-05.kt
index bed20d5..530fff1 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-05.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel05
+package kotlinx.coroutines.guide.cancel05
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val job = launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-06.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-06.kt
index c0c38c0..84f3038 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-06.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel06
+package kotlinx.coroutines.guide.cancel06
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
withTimeout(1300L) {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-cancel-07.kt b/core/kotlinx-coroutines-core/test/guide/example-cancel-07.kt
index 16b27e2..4596c30 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-cancel-07.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-cancel-07.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.cancel07
+package kotlinx.coroutines.guide.cancel07
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val result = withTimeoutOrNull(1300L) {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-01.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-01.kt
index 95b8092..79013bb 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-01.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel01
+package kotlinx.coroutines.guide.channel01
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
fun main(args: Array<String>) = runBlocking {
val channel = Channel<Int>()
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-02.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-02.kt
index 35d5a90..3489545 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-02.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel02
+package kotlinx.coroutines.guide.channel02
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
fun main(args: Array<String>) = runBlocking {
val channel = Channel<Int>()
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-03.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-03.kt
index a80cbab..4bce963 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-03.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel03
+package kotlinx.coroutines.guide.channel03
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
fun CoroutineScope.produceSquares(): ReceiveChannel<Int> = produce {
for (x in 1..5) send(x * x)
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-04.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-04.kt
index 50e04ec..f4a4f83 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-04.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel04
+package kotlinx.coroutines.guide.channel04
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
fun CoroutineScope.produceNumbers() = produce<Int> {
var x = 1
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-05.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-05.kt
index 0ef3e78..ce1e999 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-05.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel05
+package kotlinx.coroutines.guide.channel05
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlin.coroutines.*
fun CoroutineScope.numbersFrom(start: Int) = produce<Int> {
var x = start
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-06.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-06.kt
index 466edab..c9837d0 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-06.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel06
+package kotlinx.coroutines.guide.channel06
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
fun CoroutineScope.produceNumbers() = produce<Int> {
var x = 1 // start from 1
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-07.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-07.kt
index 191c505..6f84775 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-07.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-07.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel07
+package kotlinx.coroutines.guide.channel07
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlin.coroutines.*
suspend fun sendString(channel: SendChannel<String>, s: String, time: Long) {
while (true) {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-08.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-08.kt
index 2cd9657..928d03b 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-08.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-08.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel08
+package kotlinx.coroutines.guide.channel08
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
val channel = Channel<Int>(4) // create buffered channel
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-09.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-09.kt
index 4eabebe..c5d6dcd 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-09.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-09.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel09
+package kotlinx.coroutines.guide.channel09
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlin.coroutines.*
data class Ball(var hits: Int)
diff --git a/core/kotlinx-coroutines-core/test/guide/example-channel-10.kt b/core/kotlinx-coroutines-core/test/guide/example-channel-10.kt
index 6d3622c..23d61cd 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-channel-10.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-channel-10.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.channel10
+package kotlinx.coroutines.guide.channel10
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
fun main(args: Array<String>) = runBlocking<Unit> {
val tickerChannel = ticker(delayMillis = 100, initialDelayMillis = 0) // create ticker channel
diff --git a/core/kotlinx-coroutines-core/test/guide/example-compose-01.kt b/core/kotlinx-coroutines-core/test/guide/example-compose-01.kt
index ae7133a..e593b29 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-compose-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-compose-01.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.compose01
+package kotlinx.coroutines.guide.compose01
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-compose-02.kt b/core/kotlinx-coroutines-core/test/guide/example-compose-02.kt
index c9f6388..0890eef 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-compose-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-compose-02.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.compose02
+package kotlinx.coroutines.guide.compose02
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-compose-03.kt b/core/kotlinx-coroutines-core/test/guide/example-compose-03.kt
index e6ffb1f..925922e 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-compose-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-compose-03.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.compose03
+package kotlinx.coroutines.guide.compose03
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-compose-04.kt b/core/kotlinx-coroutines-core/test/guide/example-compose-04.kt
index f75351e..af6e2fe 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-compose-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-compose-04.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.compose04
+package kotlinx.coroutines.guide.compose04
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-compose-05.kt b/core/kotlinx-coroutines-core/test/guide/example-compose-05.kt
index bdac000..4a244d4 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-compose-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-compose-05.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.compose05
+package kotlinx.coroutines.guide.compose05
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-compose-06.kt b/core/kotlinx-coroutines-core/test/guide/example-compose-06.kt
index 65ca12a..d128896 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-compose-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-compose-06.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.compose06
+package kotlinx.coroutines.guide.compose06
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
suspend fun doSomethingUsefulOne(): Int {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-01.kt b/core/kotlinx-coroutines-core/test/guide/example-context-01.kt
index 7058f5d..65f2ece 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-01.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context01
+package kotlinx.coroutines.guide.context01
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
launch { // context of the parent, main runBlocking coroutine
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-02.kt b/core/kotlinx-coroutines-core/test/guide/example-context-02.kt
index 4d3eb0d..038102d 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-02.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context02
+package kotlinx.coroutines.guide.context02
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
launch(Dispatchers.Unconfined) { // not confined -- will work with main thread
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-03.kt b/core/kotlinx-coroutines-core/test/guide/example-context-03.kt
index cd4a16a..9e50724 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-03.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context03
+package kotlinx.coroutines.guide.context03
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-04.kt b/core/kotlinx-coroutines-core/test/guide/example-context-04.kt
index a013c6a..45f968b 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-04.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context04
+package kotlinx.coroutines.guide.context04
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-05.kt b/core/kotlinx-coroutines-core/test/guide/example-context-05.kt
index 764ebac..0dca2a9 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-05.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context05
+package kotlinx.coroutines.guide.context05
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
println("My job is ${coroutineContext[Job]}")
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-06.kt b/core/kotlinx-coroutines-core/test/guide/example-context-06.kt
index a032b74..d4bc14b 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-06.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context06
+package kotlinx.coroutines.guide.context06
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
// launch a coroutine to process some kind of incoming request
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-07.kt b/core/kotlinx-coroutines-core/test/guide/example-context-07.kt
index b04838f..478e2a8 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-07.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-07.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context07
+package kotlinx.coroutines.guide.context07
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
// launch a coroutine to process some kind of incoming request
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-08.kt b/core/kotlinx-coroutines-core/test/guide/example-context-08.kt
index e2d57f9..dd1d482 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-08.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-08.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context08
+package kotlinx.coroutines.guide.context08
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-09.kt b/core/kotlinx-coroutines-core/test/guide/example-context-09.kt
index 1788442..7603c46 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-09.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-09.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context09
+package kotlinx.coroutines.guide.context09
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking<Unit> {
launch(Dispatchers.Default + CoroutineName("test")) {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-10.kt b/core/kotlinx-coroutines-core/test/guide/example-context-10.kt
index c129490..4f8b038 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-10.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-10.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context10
+package kotlinx.coroutines.guide.context10
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
class Activity : CoroutineScope {
lateinit var job: Job
diff --git a/core/kotlinx-coroutines-core/test/guide/example-context-11.kt b/core/kotlinx-coroutines-core/test/guide/example-context-11.kt
index d1ac5fa..24282b6 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-context-11.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-context-11.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.context11
+package kotlinx.coroutines.guide.context11
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
val threadLocal = ThreadLocal<String?>() // declare thread-local variable
diff --git a/core/kotlinx-coroutines-core/test/guide/example-exceptions-01.kt b/core/kotlinx-coroutines-core/test/guide/example-exceptions-01.kt
index d0822a0..3e72819 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-exceptions-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-exceptions-01.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.exceptions01
+package kotlinx.coroutines.guide.exceptions01
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val job = GlobalScope.launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-exceptions-02.kt b/core/kotlinx-coroutines-core/test/guide/example-exceptions-02.kt
index 90a97db..b11d0bc 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-exceptions-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-exceptions-02.kt
@@ -3,9 +3,9 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.exceptions02
+package kotlinx.coroutines.guide.exceptions02
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
fun main(args: Array<String>) = runBlocking {
val handler = CoroutineExceptionHandler { _, exception ->
diff --git a/core/kotlinx-coroutines-core/test/guide/example-exceptions-03.kt b/core/kotlinx-coroutines-core/test/guide/example-exceptions-03.kt
index 53ea8e0..a1f2c4b 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-exceptions-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-exceptions-03.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.exceptions03
+package kotlinx.coroutines.guide.exceptions03
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking {
val job = launch {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-exceptions-04.kt b/core/kotlinx-coroutines-core/test/guide/example-exceptions-04.kt
index 0a1741a..5db1e84 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-exceptions-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-exceptions-04.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.exceptions04
+package kotlinx.coroutines.guide.exceptions04
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking {
val handler = CoroutineExceptionHandler { _, exception ->
diff --git a/core/kotlinx-coroutines-core/test/guide/example-exceptions-05.kt b/core/kotlinx-coroutines-core/test/guide/example-exceptions-05.kt
index 34b9d04..2f8a114 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-exceptions-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-exceptions-05.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.exceptions05
+package kotlinx.coroutines.guide.exceptions05
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.exceptions.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.exceptions.*
+import kotlin.coroutines.*
import java.io.*
fun main(args: Array<String>) = runBlocking {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-exceptions-06.kt b/core/kotlinx-coroutines-core/test/guide/example-exceptions-06.kt
index d08c57a..6566168 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-exceptions-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-exceptions-06.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.exceptions06
+package kotlinx.coroutines.guide.exceptions06
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
import java.io.*
fun main(args: Array<String>) = runBlocking {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-select-01.kt b/core/kotlinx-coroutines-core/test/guide/example-select-01.kt
index 79ac155..fd84c1d 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-select-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-select-01.kt
@@ -3,13 +3,13 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.select01
+package kotlinx.coroutines.guide.select01
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.selects.*
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.selects.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun CoroutineScope.fizz() = produce<String> {
while (true) { // sends "Fizz" every 300 ms
diff --git a/core/kotlinx-coroutines-core/test/guide/example-select-02.kt b/core/kotlinx-coroutines-core/test/guide/example-select-02.kt
index fb19f11..731fb68 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-select-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-select-02.kt
@@ -3,12 +3,12 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.select02
+package kotlinx.coroutines.guide.select02
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.selects.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.selects.*
+import kotlin.coroutines.*
suspend fun selectAorB(a: ReceiveChannel<String>, b: ReceiveChannel<String>): String =
select<String> {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-select-03.kt b/core/kotlinx-coroutines-core/test/guide/example-select-03.kt
index 01e35a3..56fb09c 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-select-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-select-03.kt
@@ -3,12 +3,12 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.select03
+package kotlinx.coroutines.guide.select03
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.selects.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.selects.*
+import kotlin.coroutines.*
fun CoroutineScope.produceNumbers(side: SendChannel<Int>) = produce<Int> {
for (num in 1..10) { // produce 10 numbers from 1 to 10
diff --git a/core/kotlinx-coroutines-core/test/guide/example-select-04.kt b/core/kotlinx-coroutines-core/test/guide/example-select-04.kt
index b8781e2..aacfe7c 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-select-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-select-04.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.select04
+package kotlinx.coroutines.guide.select04
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.selects.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.selects.*
import java.util.*
fun CoroutineScope.asyncString(time: Int) = async {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-select-05.kt b/core/kotlinx-coroutines-core/test/guide/example-select-05.kt
index e02668e..a13d040 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-select-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-select-05.kt
@@ -3,12 +3,12 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.select05
+package kotlinx.coroutines.guide.select05
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.selects.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.selects.*
+import kotlin.coroutines.*
fun CoroutineScope.switchMapDeferreds(input: ReceiveChannel<Deferred<String>>) = produce<String> {
var current = input.receive() // start with first received deferred value
diff --git a/core/kotlinx-coroutines-core/test/guide/example-supervision-01.kt b/core/kotlinx-coroutines-core/test/guide/example-supervision-01.kt
index 3af7286..43a8c70 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-supervision-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-supervision-01.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.supervision01
+package kotlinx.coroutines.guide.supervision01
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking {
val supervisor = SupervisorJob()
diff --git a/core/kotlinx-coroutines-core/test/guide/example-supervision-02.kt b/core/kotlinx-coroutines-core/test/guide/example-supervision-02.kt
index 57a0270..28490a4 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-supervision-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-supervision-02.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.supervision02
+package kotlinx.coroutines.guide.supervision02
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking {
try {
diff --git a/core/kotlinx-coroutines-core/test/guide/example-supervision-03.kt b/core/kotlinx-coroutines-core/test/guide/example-supervision-03.kt
index b399ab9..a9f38a8 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-supervision-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-supervision-03.kt
@@ -3,10 +3,10 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.supervision03
+package kotlinx.coroutines.guide.supervision03
-import kotlinx.coroutines.experimental.*
-import kotlin.coroutines.experimental.*
+import kotlinx.coroutines.*
+import kotlin.coroutines.*
fun main(args: Array<String>) = runBlocking {
val handler = CoroutineExceptionHandler { _, exception ->
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-01.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-01.kt
index 50781a7..f7f4bbc 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-01.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-01.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync01
+package kotlinx.coroutines.guide.sync01
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-01b.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-01b.kt
index 0e2d4f0..119a291 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-01b.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-01b.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync01b
+package kotlinx.coroutines.guide.sync01b
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-02.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-02.kt
index fa600e0..b338b17 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-02.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-02.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync02
+package kotlinx.coroutines.guide.sync02
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-03.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-03.kt
index acc40b5..bfedaa1 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-03.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-03.kt
@@ -3,12 +3,12 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync03
+package kotlinx.coroutines.guide.sync03
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import java.util.concurrent.atomic.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-04.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-04.kt
index 345b251..b9dd90a 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-04.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-04.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync04
+package kotlinx.coroutines.guide.sync04
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-05.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-05.kt
index 6fc081e..bfe40a0 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-05.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-05.kt
@@ -3,11 +3,11 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync05
+package kotlinx.coroutines.guide.sync05
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-06.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-06.kt
index 12ab068..af54318 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-06.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-06.kt
@@ -3,12 +3,12 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync06
+package kotlinx.coroutines.guide.sync06
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.sync.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.sync.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/example-sync-07.kt b/core/kotlinx-coroutines-core/test/guide/example-sync-07.kt
index 0c256a0..f781fc8 100644
--- a/core/kotlinx-coroutines-core/test/guide/example-sync-07.kt
+++ b/core/kotlinx-coroutines-core/test/guide/example-sync-07.kt
@@ -3,12 +3,12 @@
*/
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.sync07
+package kotlinx.coroutines.guide.sync07
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
import kotlin.system.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
suspend fun CoroutineScope.massiveRun(action: suspend () -> Unit) {
val n = 100 // number of coroutines to launch
diff --git a/core/kotlinx-coroutines-core/test/guide/test/BasicsGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/BasicsGuideTest.kt
index 183b61c..9c11fbd 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/BasicsGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/BasicsGuideTest.kt
@@ -1,53 +1,53 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class BasicsGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic01() {
- test("KotlinxCoroutinesExperimentalGuideBasic01") { kotlinx.coroutines.experimental.guide.basic01.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic01() {
+ test("KotlinxCoroutinesGuideBasic01") { kotlinx.coroutines.guide.basic01.main(emptyArray()) }.verifyLines(
"Hello,",
"World!"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic02() {
- test("KotlinxCoroutinesExperimentalGuideBasic02") { kotlinx.coroutines.experimental.guide.basic02.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic02() {
+ test("KotlinxCoroutinesGuideBasic02") { kotlinx.coroutines.guide.basic02.main(emptyArray()) }.verifyLines(
"Hello,",
"World!"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic02b() {
- test("KotlinxCoroutinesExperimentalGuideBasic02b") { kotlinx.coroutines.experimental.guide.basic02b.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic02b() {
+ test("KotlinxCoroutinesGuideBasic02b") { kotlinx.coroutines.guide.basic02b.main(emptyArray()) }.verifyLines(
"Hello,",
"World!"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic03() {
- test("KotlinxCoroutinesExperimentalGuideBasic03") { kotlinx.coroutines.experimental.guide.basic03.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic03() {
+ test("KotlinxCoroutinesGuideBasic03") { kotlinx.coroutines.guide.basic03.main(emptyArray()) }.verifyLines(
"Hello,",
"World!"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic03s() {
- test("KotlinxCoroutinesExperimentalGuideBasic03s") { kotlinx.coroutines.experimental.guide.basic03s.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic03s() {
+ test("KotlinxCoroutinesGuideBasic03s") { kotlinx.coroutines.guide.basic03s.main(emptyArray()) }.verifyLines(
"Hello,",
"World!"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic04() {
- test("KotlinxCoroutinesExperimentalGuideBasic04") { kotlinx.coroutines.experimental.guide.basic04.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic04() {
+ test("KotlinxCoroutinesGuideBasic04") { kotlinx.coroutines.guide.basic04.main(emptyArray()) }.verifyLines(
"Task from coroutine scope",
"Task from runBlocking",
"Task from nested launch",
@@ -56,23 +56,23 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic05() {
- test("KotlinxCoroutinesExperimentalGuideBasic05") { kotlinx.coroutines.experimental.guide.basic05.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic05() {
+ test("KotlinxCoroutinesGuideBasic05") { kotlinx.coroutines.guide.basic05.main(emptyArray()) }.verifyLines(
"Hello,",
"World!"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic06() {
- test("KotlinxCoroutinesExperimentalGuideBasic06") { kotlinx.coroutines.experimental.guide.basic06.main(emptyArray()) }.also { lines ->
+ fun testKotlinxCoroutinesGuideBasic06() {
+ test("KotlinxCoroutinesGuideBasic06") { kotlinx.coroutines.guide.basic06.main(emptyArray()) }.also { lines ->
check(lines.size == 1 && lines[0] == ".".repeat(100_000))
}
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideBasic07() {
- test("KotlinxCoroutinesExperimentalGuideBasic07") { kotlinx.coroutines.experimental.guide.basic07.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideBasic07() {
+ test("KotlinxCoroutinesGuideBasic07") { kotlinx.coroutines.guide.basic07.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ..."
diff --git a/core/kotlinx-coroutines-core/test/guide/test/CancellationTimeOutsGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/CancellationTimeOutsGuideTest.kt
index 36a7875..47f5e88 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/CancellationTimeOutsGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/CancellationTimeOutsGuideTest.kt
@@ -1,13 +1,13 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class CancellationTimeOutsGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel01() {
- test("KotlinxCoroutinesExperimentalGuideCancel01") { kotlinx.coroutines.experimental.guide.cancel01.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCancel01() {
+ test("KotlinxCoroutinesGuideCancel01") { kotlinx.coroutines.guide.cancel01.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
@@ -17,8 +17,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel02() {
- test("KotlinxCoroutinesExperimentalGuideCancel02") { kotlinx.coroutines.experimental.guide.cancel02.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCancel02() {
+ test("KotlinxCoroutinesGuideCancel02") { kotlinx.coroutines.guide.cancel02.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
@@ -30,8 +30,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel03() {
- test("KotlinxCoroutinesExperimentalGuideCancel03") { kotlinx.coroutines.experimental.guide.cancel03.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCancel03() {
+ test("KotlinxCoroutinesGuideCancel03") { kotlinx.coroutines.guide.cancel03.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
@@ -41,8 +41,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel04() {
- test("KotlinxCoroutinesExperimentalGuideCancel04") { kotlinx.coroutines.experimental.guide.cancel04.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCancel04() {
+ test("KotlinxCoroutinesGuideCancel04") { kotlinx.coroutines.guide.cancel04.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
@@ -53,8 +53,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel05() {
- test("KotlinxCoroutinesExperimentalGuideCancel05") { kotlinx.coroutines.experimental.guide.cancel05.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCancel05() {
+ test("KotlinxCoroutinesGuideCancel05") { kotlinx.coroutines.guide.cancel05.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
@@ -66,18 +66,18 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel06() {
- test("KotlinxCoroutinesExperimentalGuideCancel06") { kotlinx.coroutines.experimental.guide.cancel06.main(emptyArray()) }.verifyLinesStartWith(
+ fun testKotlinxCoroutinesGuideCancel06() {
+ test("KotlinxCoroutinesGuideCancel06") { kotlinx.coroutines.guide.cancel06.main(emptyArray()) }.verifyLinesStartWith(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
- "Exception in thread \"main\" kotlinx.coroutines.experimental.TimeoutCancellationException: Timed out waiting for 1300 ms"
+ "Exception in thread \"main\" kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 1300 ms"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCancel07() {
- test("KotlinxCoroutinesExperimentalGuideCancel07") { kotlinx.coroutines.experimental.guide.cancel07.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCancel07() {
+ test("KotlinxCoroutinesGuideCancel07") { kotlinx.coroutines.guide.cancel07.main(emptyArray()) }.verifyLines(
"I'm sleeping 0 ...",
"I'm sleeping 1 ...",
"I'm sleeping 2 ...",
diff --git a/core/kotlinx-coroutines-core/test/guide/test/ChannelsGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/ChannelsGuideTest.kt
index 5699c9a..5f6323c 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/ChannelsGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/ChannelsGuideTest.kt
@@ -1,13 +1,13 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class ChannelsGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel01() {
- test("KotlinxCoroutinesExperimentalGuideChannel01") { kotlinx.coroutines.experimental.guide.channel01.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel01() {
+ test("KotlinxCoroutinesGuideChannel01") { kotlinx.coroutines.guide.channel01.main(emptyArray()) }.verifyLines(
"1",
"4",
"9",
@@ -18,8 +18,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel02() {
- test("KotlinxCoroutinesExperimentalGuideChannel02") { kotlinx.coroutines.experimental.guide.channel02.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel02() {
+ test("KotlinxCoroutinesGuideChannel02") { kotlinx.coroutines.guide.channel02.main(emptyArray()) }.verifyLines(
"1",
"4",
"9",
@@ -30,8 +30,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel03() {
- test("KotlinxCoroutinesExperimentalGuideChannel03") { kotlinx.coroutines.experimental.guide.channel03.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel03() {
+ test("KotlinxCoroutinesGuideChannel03") { kotlinx.coroutines.guide.channel03.main(emptyArray()) }.verifyLines(
"1",
"4",
"9",
@@ -42,8 +42,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel04() {
- test("KotlinxCoroutinesExperimentalGuideChannel04") { kotlinx.coroutines.experimental.guide.channel04.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel04() {
+ test("KotlinxCoroutinesGuideChannel04") { kotlinx.coroutines.guide.channel04.main(emptyArray()) }.verifyLines(
"1",
"4",
"9",
@@ -54,8 +54,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel05() {
- test("KotlinxCoroutinesExperimentalGuideChannel05") { kotlinx.coroutines.experimental.guide.channel05.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel05() {
+ test("KotlinxCoroutinesGuideChannel05") { kotlinx.coroutines.guide.channel05.main(emptyArray()) }.verifyLines(
"2",
"3",
"5",
@@ -70,15 +70,15 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel06() {
- test("KotlinxCoroutinesExperimentalGuideChannel06") { kotlinx.coroutines.experimental.guide.channel06.main(emptyArray()) }.also { lines ->
+ fun testKotlinxCoroutinesGuideChannel06() {
+ test("KotlinxCoroutinesGuideChannel06") { kotlinx.coroutines.guide.channel06.main(emptyArray()) }.also { lines ->
check(lines.size == 10 && lines.withIndex().all { (i, line) -> line.startsWith("Processor #") && line.endsWith(" received ${i + 1}") })
}
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel07() {
- test("KotlinxCoroutinesExperimentalGuideChannel07") { kotlinx.coroutines.experimental.guide.channel07.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel07() {
+ test("KotlinxCoroutinesGuideChannel07") { kotlinx.coroutines.guide.channel07.main(emptyArray()) }.verifyLines(
"foo",
"foo",
"BAR!",
@@ -89,8 +89,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel08() {
- test("KotlinxCoroutinesExperimentalGuideChannel08") { kotlinx.coroutines.experimental.guide.channel08.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel08() {
+ test("KotlinxCoroutinesGuideChannel08") { kotlinx.coroutines.guide.channel08.main(emptyArray()) }.verifyLines(
"Sending 0",
"Sending 1",
"Sending 2",
@@ -100,8 +100,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel09() {
- test("KotlinxCoroutinesExperimentalGuideChannel09") { kotlinx.coroutines.experimental.guide.channel09.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel09() {
+ test("KotlinxCoroutinesGuideChannel09") { kotlinx.coroutines.guide.channel09.main(emptyArray()) }.verifyLines(
"ping Ball(hits=1)",
"pong Ball(hits=2)",
"ping Ball(hits=3)",
@@ -110,8 +110,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideChannel10() {
- test("KotlinxCoroutinesExperimentalGuideChannel10") { kotlinx.coroutines.experimental.guide.channel10.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideChannel10() {
+ test("KotlinxCoroutinesGuideChannel10") { kotlinx.coroutines.guide.channel10.main(emptyArray()) }.verifyLines(
"Initial element is available immediately: kotlin.Unit",
"Next element is not ready in 50 ms: null",
"Next element is ready in 100 ms: kotlin.Unit",
diff --git a/core/kotlinx-coroutines-core/test/guide/test/ComposingGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/ComposingGuideTest.kt
index 2770f18..c44dbba 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/ComposingGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/ComposingGuideTest.kt
@@ -1,53 +1,53 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class ComposingGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideCompose01() {
- test("KotlinxCoroutinesExperimentalGuideCompose01") { kotlinx.coroutines.experimental.guide.compose01.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideCompose01() {
+ test("KotlinxCoroutinesGuideCompose01") { kotlinx.coroutines.guide.compose01.main(emptyArray()) }.verifyLinesArbitraryTime(
"The answer is 42",
"Completed in 2017 ms"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCompose02() {
- test("KotlinxCoroutinesExperimentalGuideCompose02") { kotlinx.coroutines.experimental.guide.compose02.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideCompose02() {
+ test("KotlinxCoroutinesGuideCompose02") { kotlinx.coroutines.guide.compose02.main(emptyArray()) }.verifyLinesArbitraryTime(
"The answer is 42",
"Completed in 1017 ms"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCompose03() {
- test("KotlinxCoroutinesExperimentalGuideCompose03") { kotlinx.coroutines.experimental.guide.compose03.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideCompose03() {
+ test("KotlinxCoroutinesGuideCompose03") { kotlinx.coroutines.guide.compose03.main(emptyArray()) }.verifyLinesArbitraryTime(
"The answer is 42",
"Completed in 1017 ms"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCompose04() {
- test("KotlinxCoroutinesExperimentalGuideCompose04") { kotlinx.coroutines.experimental.guide.compose04.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideCompose04() {
+ test("KotlinxCoroutinesGuideCompose04") { kotlinx.coroutines.guide.compose04.main(emptyArray()) }.verifyLinesArbitraryTime(
"The answer is 42",
"Completed in 1085 ms"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCompose05() {
- test("KotlinxCoroutinesExperimentalGuideCompose05") { kotlinx.coroutines.experimental.guide.compose05.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideCompose05() {
+ test("KotlinxCoroutinesGuideCompose05") { kotlinx.coroutines.guide.compose05.main(emptyArray()) }.verifyLinesArbitraryTime(
"The answer is 42",
"Completed in 1017 ms"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideCompose06() {
- test("KotlinxCoroutinesExperimentalGuideCompose06") { kotlinx.coroutines.experimental.guide.compose06.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideCompose06() {
+ test("KotlinxCoroutinesGuideCompose06") { kotlinx.coroutines.guide.compose06.main(emptyArray()) }.verifyLines(
"Second child throws an exception",
"First child was cancelled",
"Computation failed with ArithmeticException"
diff --git a/core/kotlinx-coroutines-core/test/guide/test/DispatcherGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/DispatcherGuideTest.kt
index f45bc13..66d5b05 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/DispatcherGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/DispatcherGuideTest.kt
@@ -1,13 +1,13 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class DispatchersGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext01() {
- test("KotlinxCoroutinesExperimentalGuideContext01") { kotlinx.coroutines.experimental.guide.context01.main(emptyArray()) }.verifyLinesStartUnordered(
+ fun testKotlinxCoroutinesGuideContext01() {
+ test("KotlinxCoroutinesGuideContext01") { kotlinx.coroutines.guide.context01.main(emptyArray()) }.verifyLinesStartUnordered(
"Unconfined : I'm working in thread main",
"Default : I'm working in thread DefaultDispatcher-worker-1",
"newSingleThreadContext: I'm working in thread MyOwnThread",
@@ -16,8 +16,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext02() {
- test("KotlinxCoroutinesExperimentalGuideContext02") { kotlinx.coroutines.experimental.guide.context02.main(emptyArray()) }.verifyLinesStart(
+ fun testKotlinxCoroutinesGuideContext02() {
+ test("KotlinxCoroutinesGuideContext02") { kotlinx.coroutines.guide.context02.main(emptyArray()) }.verifyLinesStart(
"Unconfined : I'm working in thread main",
"main runBlocking: I'm working in thread main",
"Unconfined : After delay in thread kotlinx.coroutines.DefaultExecutor",
@@ -26,8 +26,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext03() {
- test("KotlinxCoroutinesExperimentalGuideContext03") { kotlinx.coroutines.experimental.guide.context03.main(emptyArray()) }.verifyLinesFlexibleThread(
+ fun testKotlinxCoroutinesGuideContext03() {
+ test("KotlinxCoroutinesGuideContext03") { kotlinx.coroutines.guide.context03.main(emptyArray()) }.verifyLinesFlexibleThread(
"[main @coroutine#2] I'm computing a piece of the answer",
"[main @coroutine#3] I'm computing another piece of the answer",
"[main @coroutine#1] The answer is 42"
@@ -35,8 +35,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext04() {
- test("KotlinxCoroutinesExperimentalGuideContext04") { kotlinx.coroutines.experimental.guide.context04.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideContext04() {
+ test("KotlinxCoroutinesGuideContext04") { kotlinx.coroutines.guide.context04.main(emptyArray()) }.verifyLines(
"[Ctx1 @coroutine#1] Started in ctx1",
"[Ctx2 @coroutine#1] Working in ctx2",
"[Ctx1 @coroutine#1] Back to ctx1"
@@ -44,15 +44,15 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext05() {
- test("KotlinxCoroutinesExperimentalGuideContext05") { kotlinx.coroutines.experimental.guide.context05.main(emptyArray()) }.also { lines ->
+ fun testKotlinxCoroutinesGuideContext05() {
+ test("KotlinxCoroutinesGuideContext05") { kotlinx.coroutines.guide.context05.main(emptyArray()) }.also { lines ->
check(lines.size == 1 && lines[0].startsWith("My job is \"coroutine#1\":BlockingCoroutine{Active}@"))
}
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext06() {
- test("KotlinxCoroutinesExperimentalGuideContext06") { kotlinx.coroutines.experimental.guide.context06.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideContext06() {
+ test("KotlinxCoroutinesGuideContext06") { kotlinx.coroutines.guide.context06.main(emptyArray()) }.verifyLines(
"job1: I run in GlobalScope and execute independently!",
"job2: I am a child of the request coroutine",
"job1: I am not affected by cancellation of the request",
@@ -61,8 +61,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext07() {
- test("KotlinxCoroutinesExperimentalGuideContext07") { kotlinx.coroutines.experimental.guide.context07.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideContext07() {
+ test("KotlinxCoroutinesGuideContext07") { kotlinx.coroutines.guide.context07.main(emptyArray()) }.verifyLines(
"request: I'm done and I don't explicitly join my children that are still active",
"Coroutine 0 is done",
"Coroutine 1 is done",
@@ -72,8 +72,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext08() {
- test("KotlinxCoroutinesExperimentalGuideContext08") { kotlinx.coroutines.experimental.guide.context08.main(emptyArray()) }.verifyLinesFlexibleThread(
+ fun testKotlinxCoroutinesGuideContext08() {
+ test("KotlinxCoroutinesGuideContext08") { kotlinx.coroutines.guide.context08.main(emptyArray()) }.verifyLinesFlexibleThread(
"[main @main#1] Started main coroutine",
"[main @v1coroutine#2] Computing v1",
"[main @v2coroutine#3] Computing v2",
@@ -82,15 +82,15 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext09() {
- test("KotlinxCoroutinesExperimentalGuideContext09") { kotlinx.coroutines.experimental.guide.context09.main(emptyArray()) }.verifyLinesFlexibleThread(
+ fun testKotlinxCoroutinesGuideContext09() {
+ test("KotlinxCoroutinesGuideContext09") { kotlinx.coroutines.guide.context09.main(emptyArray()) }.verifyLinesFlexibleThread(
"I'm working in thread DefaultDispatcher-worker-1 @test#2"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext10() {
- test("KotlinxCoroutinesExperimentalGuideContext10") { kotlinx.coroutines.experimental.guide.context10.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideContext10() {
+ test("KotlinxCoroutinesGuideContext10") { kotlinx.coroutines.guide.context10.main(emptyArray()) }.verifyLines(
"Launched coroutines",
"Coroutine 0 is done",
"Coroutine 1 is done",
@@ -99,8 +99,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideContext11() {
- test("KotlinxCoroutinesExperimentalGuideContext11") { kotlinx.coroutines.experimental.guide.context11.main(emptyArray()) }.verifyLinesFlexibleThread(
+ fun testKotlinxCoroutinesGuideContext11() {
+ test("KotlinxCoroutinesGuideContext11") { kotlinx.coroutines.guide.context11.main(emptyArray()) }.verifyLinesFlexibleThread(
"Pre-main, current thread: Thread[main @coroutine#1,5,main], thread local value: 'main'",
"Launch start, current thread: Thread[DefaultDispatcher-worker-1 @coroutine#2,5,main], thread local value: 'launch'",
"After yield, current thread: Thread[DefaultDispatcher-worker-2 @coroutine#2,5,main], thread local value: 'launch'",
diff --git a/core/kotlinx-coroutines-core/test/guide/test/ExceptionsGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/ExceptionsGuideTest.kt
index 646eec6..305d016 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/ExceptionsGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/ExceptionsGuideTest.kt
@@ -1,13 +1,13 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class ExceptionsGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideExceptions01() {
- test("KotlinxCoroutinesExperimentalGuideExceptions01") { kotlinx.coroutines.experimental.guide.exceptions01.main(emptyArray()) }.verifyExceptions(
+ fun testKotlinxCoroutinesGuideExceptions01() {
+ test("KotlinxCoroutinesGuideExceptions01") { kotlinx.coroutines.guide.exceptions01.main(emptyArray()) }.verifyExceptions(
"Throwing exception from launch",
"Exception in thread \"DefaultDispatcher-worker-2 @coroutine#2\" java.lang.IndexOutOfBoundsException",
"Joined failed job",
@@ -17,15 +17,15 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideExceptions02() {
- test("KotlinxCoroutinesExperimentalGuideExceptions02") { kotlinx.coroutines.experimental.guide.exceptions02.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideExceptions02() {
+ test("KotlinxCoroutinesGuideExceptions02") { kotlinx.coroutines.guide.exceptions02.main(emptyArray()) }.verifyLines(
"Caught java.lang.AssertionError"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideExceptions03() {
- test("KotlinxCoroutinesExperimentalGuideExceptions03") { kotlinx.coroutines.experimental.guide.exceptions03.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideExceptions03() {
+ test("KotlinxCoroutinesGuideExceptions03") { kotlinx.coroutines.guide.exceptions03.main(emptyArray()) }.verifyLines(
"Cancelling child",
"Child is cancelled",
"Parent is not cancelled"
@@ -33,8 +33,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideExceptions04() {
- test("KotlinxCoroutinesExperimentalGuideExceptions04") { kotlinx.coroutines.experimental.guide.exceptions04.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideExceptions04() {
+ test("KotlinxCoroutinesGuideExceptions04") { kotlinx.coroutines.guide.exceptions04.main(emptyArray()) }.verifyLines(
"Second child throws an exception",
"Children are cancelled, but exception is not handled until all children terminate",
"The first child finished its non cancellable block",
@@ -43,23 +43,23 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideExceptions05() {
- test("KotlinxCoroutinesExperimentalGuideExceptions05") { kotlinx.coroutines.experimental.guide.exceptions05.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideExceptions05() {
+ test("KotlinxCoroutinesGuideExceptions05") { kotlinx.coroutines.guide.exceptions05.main(emptyArray()) }.verifyLines(
"Caught java.io.IOException with suppressed [java.lang.ArithmeticException]"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideExceptions06() {
- test("KotlinxCoroutinesExperimentalGuideExceptions06") { kotlinx.coroutines.experimental.guide.exceptions06.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideExceptions06() {
+ test("KotlinxCoroutinesGuideExceptions06") { kotlinx.coroutines.guide.exceptions06.main(emptyArray()) }.verifyLines(
"Rethrowing CancellationException with original cause",
"Caught original java.io.IOException"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSupervision01() {
- test("KotlinxCoroutinesExperimentalGuideSupervision01") { kotlinx.coroutines.experimental.guide.supervision01.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSupervision01() {
+ test("KotlinxCoroutinesGuideSupervision01") { kotlinx.coroutines.guide.supervision01.main(emptyArray()) }.verifyLines(
"First child is failing",
"First child is cancelled: true, but second one is still active",
"Cancelling supervisor",
@@ -68,8 +68,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSupervision02() {
- test("KotlinxCoroutinesExperimentalGuideSupervision02") { kotlinx.coroutines.experimental.guide.supervision02.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSupervision02() {
+ test("KotlinxCoroutinesGuideSupervision02") { kotlinx.coroutines.guide.supervision02.main(emptyArray()) }.verifyLines(
"Child is sleeping",
"Throwing exception from scope",
"Child is cancelled",
@@ -78,8 +78,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSupervision03() {
- test("KotlinxCoroutinesExperimentalGuideSupervision03") { kotlinx.coroutines.experimental.guide.supervision03.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSupervision03() {
+ test("KotlinxCoroutinesGuideSupervision03") { kotlinx.coroutines.guide.supervision03.main(emptyArray()) }.verifyLines(
"Scope is completing",
"Child throws an exception",
"Caught java.lang.AssertionError",
diff --git a/core/kotlinx-coroutines-core/test/guide/test/GuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/GuideTest.kt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/kotlinx-coroutines-core/test/guide/test/GuideTest.kt
diff --git a/core/kotlinx-coroutines-core/test/guide/test/SelectGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/SelectGuideTest.kt
index b638884..990b87e 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/SelectGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/SelectGuideTest.kt
@@ -1,13 +1,13 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class SelectGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideSelect01() {
- test("KotlinxCoroutinesExperimentalGuideSelect01") { kotlinx.coroutines.experimental.guide.select01.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSelect01() {
+ test("KotlinxCoroutinesGuideSelect01") { kotlinx.coroutines.guide.select01.main(emptyArray()) }.verifyLines(
"fizz -> 'Fizz'",
"buzz -> 'Buzz!'",
"fizz -> 'Fizz'",
@@ -19,8 +19,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSelect02() {
- test("KotlinxCoroutinesExperimentalGuideSelect02") { kotlinx.coroutines.experimental.guide.select02.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSelect02() {
+ test("KotlinxCoroutinesGuideSelect02") { kotlinx.coroutines.guide.select02.main(emptyArray()) }.verifyLines(
"a -> 'Hello 0'",
"a -> 'Hello 1'",
"b -> 'World 0'",
@@ -33,8 +33,8 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSelect03() {
- test("KotlinxCoroutinesExperimentalGuideSelect03") { kotlinx.coroutines.experimental.guide.select03.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSelect03() {
+ test("KotlinxCoroutinesGuideSelect03") { kotlinx.coroutines.guide.select03.main(emptyArray()) }.verifyLines(
"Consuming 1",
"Side channel has 2",
"Side channel has 3",
@@ -50,16 +50,16 @@
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSelect04() {
- test("KotlinxCoroutinesExperimentalGuideSelect04") { kotlinx.coroutines.experimental.guide.select04.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSelect04() {
+ test("KotlinxCoroutinesGuideSelect04") { kotlinx.coroutines.guide.select04.main(emptyArray()) }.verifyLines(
"Deferred 4 produced answer 'Waited for 128 ms'",
"11 coroutines are still active"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSelect05() {
- test("KotlinxCoroutinesExperimentalGuideSelect05") { kotlinx.coroutines.experimental.guide.select05.main(emptyArray()) }.verifyLines(
+ fun testKotlinxCoroutinesGuideSelect05() {
+ test("KotlinxCoroutinesGuideSelect05") { kotlinx.coroutines.guide.select05.main(emptyArray()) }.verifyLines(
"BEGIN",
"Replace",
"END",
diff --git a/core/kotlinx-coroutines-core/test/guide/test/SharedStateGuideTest.kt b/core/kotlinx-coroutines-core/test/guide/test/SharedStateGuideTest.kt
index a6a5ddb..a18da1e 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/SharedStateGuideTest.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/SharedStateGuideTest.kt
@@ -1,69 +1,69 @@
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
import org.junit.Test
class SharedStateGuideTest {
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync01() {
- test("KotlinxCoroutinesExperimentalGuideSync01") { kotlinx.coroutines.experimental.guide.sync01.main(emptyArray()) }.verifyLinesStart(
+ fun testKotlinxCoroutinesGuideSync01() {
+ test("KotlinxCoroutinesGuideSync01") { kotlinx.coroutines.guide.sync01.main(emptyArray()) }.verifyLinesStart(
"Completed 100000 actions in",
"Counter ="
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync01b() {
- test("KotlinxCoroutinesExperimentalGuideSync01b") { kotlinx.coroutines.experimental.guide.sync01b.main(emptyArray()) }.verifyLinesStart(
+ fun testKotlinxCoroutinesGuideSync01b() {
+ test("KotlinxCoroutinesGuideSync01b") { kotlinx.coroutines.guide.sync01b.main(emptyArray()) }.verifyLinesStart(
"Completed 100000 actions in",
"Counter ="
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync02() {
- test("KotlinxCoroutinesExperimentalGuideSync02") { kotlinx.coroutines.experimental.guide.sync02.main(emptyArray()) }.verifyLinesStart(
+ fun testKotlinxCoroutinesGuideSync02() {
+ test("KotlinxCoroutinesGuideSync02") { kotlinx.coroutines.guide.sync02.main(emptyArray()) }.verifyLinesStart(
"Completed 100000 actions in",
"Counter ="
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync03() {
- test("KotlinxCoroutinesExperimentalGuideSync03") { kotlinx.coroutines.experimental.guide.sync03.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideSync03() {
+ test("KotlinxCoroutinesGuideSync03") { kotlinx.coroutines.guide.sync03.main(emptyArray()) }.verifyLinesArbitraryTime(
"Completed 100000 actions in xxx ms",
"Counter = 100000"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync04() {
- test("KotlinxCoroutinesExperimentalGuideSync04") { kotlinx.coroutines.experimental.guide.sync04.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideSync04() {
+ test("KotlinxCoroutinesGuideSync04") { kotlinx.coroutines.guide.sync04.main(emptyArray()) }.verifyLinesArbitraryTime(
"Completed 100000 actions in xxx ms",
"Counter = 100000"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync05() {
- test("KotlinxCoroutinesExperimentalGuideSync05") { kotlinx.coroutines.experimental.guide.sync05.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideSync05() {
+ test("KotlinxCoroutinesGuideSync05") { kotlinx.coroutines.guide.sync05.main(emptyArray()) }.verifyLinesArbitraryTime(
"Completed 100000 actions in xxx ms",
"Counter = 100000"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync06() {
- test("KotlinxCoroutinesExperimentalGuideSync06") { kotlinx.coroutines.experimental.guide.sync06.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideSync06() {
+ test("KotlinxCoroutinesGuideSync06") { kotlinx.coroutines.guide.sync06.main(emptyArray()) }.verifyLinesArbitraryTime(
"Completed 100000 actions in xxx ms",
"Counter = 100000"
)
}
@Test
- fun testKotlinxCoroutinesExperimentalGuideSync07() {
- test("KotlinxCoroutinesExperimentalGuideSync07") { kotlinx.coroutines.experimental.guide.sync07.main(emptyArray()) }.verifyLinesArbitraryTime(
+ fun testKotlinxCoroutinesGuideSync07() {
+ test("KotlinxCoroutinesGuideSync07") { kotlinx.coroutines.guide.sync07.main(emptyArray()) }.verifyLinesArbitraryTime(
"Completed 100000 actions in xxx ms",
"Counter = 100000"
)
diff --git a/core/kotlinx-coroutines-core/test/guide/test/TestUtil.kt b/core/kotlinx-coroutines-core/test/guide/test/TestUtil.kt
index 2d9b526..983f6c5 100644
--- a/core/kotlinx-coroutines-core/test/guide/test/TestUtil.kt
+++ b/core/kotlinx-coroutines-core/test/guide/test/TestUtil.kt
@@ -2,11 +2,11 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.guide.test
+package kotlinx.coroutines.guide.test
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.internal.*
-import kotlinx.coroutines.experimental.scheduling.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.internal.*
+import kotlinx.coroutines.scheduling.*
import org.junit.Assert.*
import java.io.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListAtomicStressLFTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListAtomicStressLFTest.kt
index 832d6e6..46f81d6 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListAtomicStressLFTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListAtomicStressLFTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import kotlinx.atomicfu.LockFreedomTestEnvironment
-import kotlinx.coroutines.experimental.TestBase
+import kotlinx.coroutines.TestBase
import org.junit.Assert.*
import org.junit.Test
import java.util.*
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListLongStressTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListLongStressTest.kt
index e005327..dde4b2f 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListLongStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListLongStressTest.kt
@@ -2,14 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.TestBase
+import kotlinx.coroutines.TestBase
import org.junit.Test
import java.util.*
import java.util.concurrent.atomic.AtomicInteger
import kotlin.concurrent.thread
-import kotlin.coroutines.experimental.buildIterator
+import kotlin.sequences.buildIterator
/**
* This stress test has 2 threads adding on one side on list, 2 more threads adding on the other,
@@ -61,7 +61,7 @@
// verification
println("Verify result")
list.validate()
- val expected = buildIterator {
+ val expected = iterator {
for (i in 0 until nAdded)
if (!shallRemove(i))
yield(i)
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListShortStressTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListShortStressTest.kt
index 49c3e17..54932ec 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListShortStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListShortStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Assert.*
import java.util.*
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListTest.kt
index a56af9d..1400441 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeLinkedListTest.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import org.junit.Assert.*
import org.junit.Test
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeListLinearizabilityTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeListLinearizabilityTest.kt
index 2464458..d87b1fb 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeListLinearizabilityTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeListLinearizabilityTest.kt
@@ -1,16 +1,15 @@
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-
@file:Suppress("unused")
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import com.devexperts.dxlab.lincheck.*
import com.devexperts.dxlab.lincheck.annotations.*
import com.devexperts.dxlab.lincheck.paramgen.*
import com.devexperts.dxlab.lincheck.stress.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.test.*
@Param(name = "value", gen = IntGen::class, conf = "1:3")
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeMPMCQueueTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeMPMCQueueTest.kt
index eccefd5..4a4d943 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeMPMCQueueTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeMPMCQueueTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueLinearizabilityTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueLinearizabilityTest.kt
index befbc19..a229ef8 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueLinearizabilityTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueLinearizabilityTest.kt
@@ -1,16 +1,15 @@
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-
@file:Suppress("unused")
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import com.devexperts.dxlab.lincheck.*
import com.devexperts.dxlab.lincheck.annotations.*
import com.devexperts.dxlab.lincheck.paramgen.*
import com.devexperts.dxlab.lincheck.stress.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.test.*
@OpGroupConfigs(OpGroupConfig(name = "consumer", nonParallel = true))
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueStressTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueStressTest.kt
index ebb9798..d92b026 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import java.util.concurrent.*
import kotlin.concurrent.*
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueTest.kt b/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueTest.kt
index b02fbe6..ab6bae5 100644
--- a/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/LockFreeMPSCQueueTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.test.*
class LockFreeMPSCQueueTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/internal/ThreadSafeHeapTest.kt b/core/kotlinx-coroutines-core/test/internal/ThreadSafeHeapTest.kt
index d8331d5..ec7b47a 100644
--- a/core/kotlinx-coroutines-core/test/internal/ThreadSafeHeapTest.kt
+++ b/core/kotlinx-coroutines-core/test/internal/ThreadSafeHeapTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.internal
+package kotlinx.coroutines.internal
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.test.*
import java.util.*
diff --git a/core/kotlinx-coroutines-core/test/linearizability/FixedBehaviourExecutionGenerator.kt b/core/kotlinx-coroutines-core/test/linearizability/FixedBehaviourExecutionGenerator.kt
index 644a7b0..1e36672 100644
--- a/core/kotlinx-coroutines-core/test/linearizability/FixedBehaviourExecutionGenerator.kt
+++ b/core/kotlinx-coroutines-core/test/linearizability/FixedBehaviourExecutionGenerator.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.channels
+package kotlinx.coroutines.channels
import com.devexperts.dxlab.lincheck.*
import com.devexperts.dxlab.lincheck.execution.*
diff --git a/core/kotlinx-coroutines-core/test/linearizability/LinTesting.kt b/core/kotlinx-coroutines-core/test/linearizability/LinTesting.kt
index e45fa7b..878dd64 100644
--- a/core/kotlinx-coroutines-core/test/linearizability/LinTesting.kt
+++ b/core/kotlinx-coroutines-core/test/linearizability/LinTesting.kt
@@ -2,18 +2,18 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
import com.devexperts.dxlab.lincheck.Actor
import com.devexperts.dxlab.lincheck.Result
import com.devexperts.dxlab.lincheck.verifier.Verifier
import java.lang.reflect.Method
import java.util.*
-import kotlin.coroutines.experimental.Continuation
-import kotlin.coroutines.experimental.CoroutineContext
-import kotlin.coroutines.experimental.EmptyCoroutineContext
-import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED
-import kotlin.coroutines.experimental.intrinsics.startCoroutineUninterceptedOrReturn
+import kotlin.coroutines.Continuation
+import kotlin.coroutines.CoroutineContext
+import kotlin.coroutines.EmptyCoroutineContext
+import kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED
+import kotlin.coroutines.intrinsics.startCoroutineUninterceptedOrReturn
data class OpResult(val name: String, val value: Any?) {
override fun toString(): String = "$name=$value"
@@ -45,13 +45,10 @@
override val context: CoroutineContext
get() = EmptyCoroutineContext
- override fun resume(value: Any?) {
+ override fun resumeWith(result: kotlin.Result<Any?>) {
+ val value = if (result.isSuccess) result.getOrNull() else result.exceptionOrNull()
resumed.get() += OpResult(name, repr(value))
}
-
- override fun resumeWithException(exception: Throwable) {
- resumed.get() += OpResult(name, repr(exception))
- }
}
)
}))
diff --git a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt
index adbeb33..2b5a896 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherRaceStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.util.concurrent.atomic.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherStressTest.kt
index 5c79f8b..9302bca 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherStressTest.kt
@@ -4,9 +4,9 @@
@file:Suppress("DeferredResultUnused")
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.util.concurrent.*
import java.util.concurrent.atomic.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt
index 28a7859..ce5ed99 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/BlockingCoroutineDispatcherTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/BlockingIOTerminationStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/BlockingIOTerminationStressTest.kt
index f43f546..de59a84 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/BlockingIOTerminationStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/BlockingIOTerminationStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental
+package kotlinx.coroutines
-import kotlinx.coroutines.experimental.scheduling.*
+import kotlinx.coroutines.scheduling.*
import org.junit.*
import java.util.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/CoroutineDispatcherTest.kt b/core/kotlinx-coroutines-core/test/scheduling/CoroutineDispatcherTest.kt
index 0f2b083..8a1eaa0 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/CoroutineDispatcherTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/CoroutineDispatcherTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Test
import java.util.concurrent.atomic.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerCloseStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerCloseStressTest.kt
index 13563b8..f91b0a9 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerCloseStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerCloseStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
import org.junit.runner.*
import org.junit.runners.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt
index e68361b..c082bd1 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerShrinkTest.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
@Ignore // these tests are too unstable on Windows, should be virtualized
class CoroutineSchedulerShrinkTest : SchedulerTestBase() {
diff --git a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerStressTest.kt
index fb22ef2..cf8a21f 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerStressTest.kt
@@ -2,16 +2,16 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.internal.*
-import kotlinx.coroutines.experimental.scheduling.SchedulerTestBase.Companion.checkPoolThreadsCreated
+import kotlinx.coroutines.*
+import kotlinx.coroutines.internal.*
+import kotlinx.coroutines.scheduling.SchedulerTestBase.Companion.checkPoolThreadsCreated
import org.junit.*
import org.junit.Test
import java.util.concurrent.*
import java.util.concurrent.atomic.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
class CoroutineSchedulerStressTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerTest.kt b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerTest.kt
index 7b39e69..780ec1b 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerTest.kt
@@ -2,13 +2,14 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.TestBase
-import org.junit.*
+import kotlinx.coroutines.TestBase
+import org.junit.Test
import java.lang.Runnable
import java.util.concurrent.*
-import kotlin.coroutines.experimental.*
+import java.util.concurrent.CountDownLatch
+import kotlin.coroutines.*
class CoroutineSchedulerTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt
index 570f91c..0123ac5 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/LimitingCoroutineDispatcherStressTest.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.Test
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
import kotlin.test.*
class LimitingCoroutineDispatcherStressTest : SchedulerTestBase() {
diff --git a/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt b/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt
index 4524f0e..b492427 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/LimitingDispatcherTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import java.util.concurrent.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/SchedulerTestBase.kt b/core/kotlinx-coroutines-core/test/scheduling/SchedulerTestBase.kt
index a48590e..2dbeee7 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/SchedulerTestBase.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/SchedulerTestBase.kt
@@ -2,13 +2,13 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
import kotlinx.atomicfu.*
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.internal.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.internal.*
import org.junit.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
abstract class SchedulerTestBase : TestBase() {
companion object {
diff --git a/core/kotlinx-coroutines-core/test/scheduling/TestTimeSource.kt b/core/kotlinx-coroutines-core/test/scheduling/TestTimeSource.kt
index 798d47a..a5c83d3 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/TestTimeSource.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/TestTimeSource.kt
@@ -2,7 +2,7 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
internal class TestTimeSource(var time: Long) : TimeSource() {
diff --git a/core/kotlinx-coroutines-core/test/scheduling/WorkQueueStressTest.kt b/core/kotlinx-coroutines-core/test/scheduling/WorkQueueStressTest.kt
index 2d69dd6..abe245f 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/WorkQueueStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/WorkQueueStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Test
import java.util.*
diff --git a/core/kotlinx-coroutines-core/test/scheduling/WorkQueueTest.kt b/core/kotlinx-coroutines-core/test/scheduling/WorkQueueTest.kt
index c57564c..c975c06 100644
--- a/core/kotlinx-coroutines-core/test/scheduling/WorkQueueTest.kt
+++ b/core/kotlinx-coroutines-core/test/scheduling/WorkQueueTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.scheduling
+package kotlinx.coroutines.scheduling
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Test
import kotlin.test.*
diff --git a/core/kotlinx-coroutines-core/test/selects/SelectChannelStressTest.kt b/core/kotlinx-coroutines-core/test/selects/SelectChannelStressTest.kt
index e842256..380ec5e 100644
--- a/core/kotlinx-coroutines-core/test/selects/SelectChannelStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/selects/SelectChannelStressTest.kt
@@ -2,11 +2,11 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.selects
+package kotlinx.coroutines.selects
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.channels.*
-import kotlinx.coroutines.experimental.intrinsics.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.channels.*
+import kotlinx.coroutines.intrinsics.*
import kotlin.test.*
class SelectChannelStressTest: TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/selects/SelectMutexStressTest.kt b/core/kotlinx-coroutines-core/test/selects/SelectMutexStressTest.kt
index ab0206c..5489ea5 100644
--- a/core/kotlinx-coroutines-core/test/selects/SelectMutexStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/selects/SelectMutexStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.selects
+package kotlinx.coroutines.selects
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.sync.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.sync.*
import kotlin.test.*
class SelectMutexStressTest : TestBase() {
@@ -15,7 +15,7 @@
val mutex = Mutex(true) as MutexImpl // locked
expect(1)
repeat(n) { i ->
- val job = launch(kotlin.coroutines.experimental.coroutineContext) {
+ val job = launch(kotlin.coroutines.coroutineContext) {
expect(i + 2)
select<Unit> {
mutex.onLock {
diff --git a/core/kotlinx-coroutines-core/test/selects/SelectPhilosophersStressTest.kt b/core/kotlinx-coroutines-core/test/selects/SelectPhilosophersStressTest.kt
index 7559406..eaff30c 100644
--- a/core/kotlinx-coroutines-core/test/selects/SelectPhilosophersStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/selects/SelectPhilosophersStressTest.kt
@@ -2,10 +2,10 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.selects
+package kotlinx.coroutines.selects
-import kotlinx.coroutines.experimental.*
-import kotlinx.coroutines.experimental.sync.*
+import kotlinx.coroutines.*
+import kotlinx.coroutines.sync.*
import org.junit.*
import org.junit.Assert.*
diff --git a/core/kotlinx-coroutines-core/test/sync/MutexStressTest.kt b/core/kotlinx-coroutines-core/test/sync/MutexStressTest.kt
index bea11d2..f1d3107 100644
--- a/core/kotlinx-coroutines-core/test/sync/MutexStressTest.kt
+++ b/core/kotlinx-coroutines-core/test/sync/MutexStressTest.kt
@@ -2,9 +2,9 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.sync
+package kotlinx.coroutines.sync
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import kotlin.test.*
class MutexStressTest : TestBase() {
diff --git a/core/kotlinx-coroutines-core/test/test/TestCoroutineContextTest.kt b/core/kotlinx-coroutines-core/test/test/TestCoroutineContextTest.kt
index e86eebc..ab524bc 100644
--- a/core/kotlinx-coroutines-core/test/test/TestCoroutineContextTest.kt
+++ b/core/kotlinx-coroutines-core/test/test/TestCoroutineContextTest.kt
@@ -2,12 +2,12 @@
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
-package kotlinx.coroutines.experimental.test
+package kotlinx.coroutines.test
-import kotlinx.coroutines.experimental.*
+import kotlinx.coroutines.*
import org.junit.*
import org.junit.Assert.*
-import kotlin.coroutines.experimental.*
+import kotlin.coroutines.*
class TestCoroutineContextTest {
private val injectedContext = TestCoroutineContext()