Skip to content

Commit

Permalink
Migrate to Kotlin 1.3 coroutines, drop experimental from package
Browse files Browse the repository at this point in the history
* Uses Kotlin version 1.3-M2
* Uses Kotlin/Native version 0.9
  • Loading branch information
elizarov committed Sep 12, 2018
1 parent 75cfc4f commit 4da16c9
Show file tree
Hide file tree
Showing 538 changed files with 3,142 additions and 3,067 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
## Version 0.11-rc

* `select` expression with onJoin/onAwait/onSend/onReceive clauses.
* `Mutex` is moved to `kotlinx.coroutines.experimental.sync` package.
* `Mutex` is moved to `kotlinx.coroutines.sync` package.
* `ClosedSendChannelException` is a subclass of `CancellationException` now.
* New sections on "Shared mutable state and concurrency" and "Select expression"
in [coroutines guide](coroutines-guide.md).
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.26.0) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.26.0)

Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
This is a companion version for Kotlin 1.2.61 release.
This is a companion version for Kotlin 1.3-M2 release.

```kotlin
GlobalScope.launch {
Expand Down Expand Up @@ -71,7 +71,7 @@ And make sure that you use the latest Kotlin version:

```xml
<properties>
<kotlin.version>1.2.61</kotlin.version>
<kotlin.version>1.3-M2</kotlin.version>
</properties>
```

Expand All @@ -87,7 +87,7 @@ And make sure that you use the latest Kotlin version:

```groovy
buildscript {
ext.kotlin_version = '1.2.61'
ext.kotlin_version = '1.3-M2'
}
```

Expand Down Expand Up @@ -115,7 +115,7 @@ module as dependency when using `kotlinx.coroutines` on Android:
```groovy
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.26.0'
```
This gives you access to Android [Dispatchers.Main](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.experimental.android/kotlinx.coroutines.experimental.-dispatchers/index.html)
This gives you access to Android [Dispatchers.Main](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.android/kotlinx.coroutines.-dispatchers/index.html)
coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this
exception is logged before crashing Android application, similarly to the way uncaught exceptions in
threads are handled by Android runtime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

package benchmarks

import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*

@Warmup(iterations = 5)
@Measurement(iterations = 10)
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/src/jmh/kotlin/benchmarks/ChannelSinkBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

package benchmarks

import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*
import kotlin.coroutines.experimental.*
import kotlin.coroutines.*

@Warmup(iterations = 10, time = 1)
@Measurement(iterations = 10, time = 1)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/jmh/kotlin/benchmarks/ForkJoinBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package benchmarks

import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

Expand Down
14 changes: 7 additions & 7 deletions benchmarks/src/jmh/kotlin/benchmarks/GuideSyncBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,36 @@ open class GuideSyncBenchmark {

@Benchmark
fun sync01Problem() {
kotlinx.coroutines.experimental.guide.sync01.main(emptyArray())
kotlinx.coroutines.guide.sync01.main(emptyArray())
}

@Benchmark
fun sync02Volatile() {
kotlinx.coroutines.experimental.guide.sync02.main(emptyArray())
kotlinx.coroutines.guide.sync02.main(emptyArray())
}

@Benchmark
fun sync03AtomicInt() {
kotlinx.coroutines.experimental.guide.sync03.main(emptyArray())
kotlinx.coroutines.guide.sync03.main(emptyArray())
}

@Benchmark
fun sync04ConfineFine() {
kotlinx.coroutines.experimental.guide.sync04.main(emptyArray())
kotlinx.coroutines.guide.sync04.main(emptyArray())
}

@Benchmark
fun sync05ConfineCoarse() {
kotlinx.coroutines.experimental.guide.sync05.main(emptyArray())
kotlinx.coroutines.guide.sync05.main(emptyArray())
}

@Benchmark
fun sync06Mutex() {
kotlinx.coroutines.experimental.guide.sync06.main(emptyArray())
kotlinx.coroutines.guide.sync06.main(emptyArray())
}

@Benchmark
fun sync07Actor() {
kotlinx.coroutines.experimental.guide.sync07.main(emptyArray())
kotlinx.coroutines.guide.sync07.main(emptyArray())
}
}
2 changes: 1 addition & 1 deletion benchmarks/src/jmh/kotlin/benchmarks/LaunchBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package benchmarks

import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
package benchmarks

import benchmarks.actors.CORES_COUNT
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.scheduling.*
import kotlinx.coroutines.*
import kotlinx.coroutines.scheduling.*
import org.openjdk.jmh.annotations.Param
import org.openjdk.jmh.annotations.Setup
import org.openjdk.jmh.annotations.TearDown
import java.io.Closeable
import kotlin.coroutines.experimental.CoroutineContext
import kotlin.coroutines.CoroutineContext

/**
* Base class to use different [CoroutineContext] in benchmarks via [Param] in inheritors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

package benchmarks

import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package benchmarks.actors

import benchmarks.*
import benchmarks.actors.StatefulActorBenchmark.*
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package benchmarks.actors

import benchmarks.*
import benchmarks.actors.PingPongActorBenchmark.*
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
package benchmarks.actors

import benchmarks.*
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*
import kotlin.coroutines.experimental.*
import kotlin.coroutines.*

/*
* Benchmark (dispatcher) Mode Cnt Score Error Units
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

package benchmarks.actors

import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.experimental.scheduling.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlinx.coroutines.scheduling.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*
import kotlin.coroutines.experimental.*
import kotlin.coroutines.*


/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package benchmarks.actors

import benchmarks.*
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
public final class kotlinx/coroutines/experimental/android/AndroidExceptionPreHandler : kotlin/coroutines/experimental/AbstractCoroutineContextElement, kotlinx/coroutines/experimental/CoroutineExceptionHandler {
public final class kotlinx/coroutines/android/AndroidExceptionPreHandler : kotlin/coroutines/AbstractCoroutineContextElement, kotlinx/coroutines/CoroutineExceptionHandler {
public fun <init> ()V
public fun handleException (Lkotlin/coroutines/experimental/CoroutineContext;Ljava/lang/Throwable;)V
public fun handleException (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Throwable;)V
}

public final class kotlinx/coroutines/experimental/android/HandlerContext : kotlinx/coroutines/experimental/android/HandlerDispatcher, kotlinx/coroutines/experimental/Delay {
public final class kotlinx/coroutines/android/HandlerContext : kotlinx/coroutines/android/HandlerDispatcher, kotlinx/coroutines/Delay {
public fun <init> (Landroid/os/Handler;Ljava/lang/String;)V
public synthetic fun <init> (Landroid/os/Handler;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun awaitFrame (Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;
public fun dispatch (Lkotlin/coroutines/experimental/CoroutineContext;Ljava/lang/Runnable;)V
public final fun awaitFrame (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun dispatch (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
public fun equals (Ljava/lang/Object;)Z
public fun getImmediate ()Lkotlinx/coroutines/experimental/android/HandlerContext;
public synthetic fun getImmediate ()Lkotlinx/coroutines/experimental/android/HandlerDispatcher;
public fun getImmediate ()Lkotlinx/coroutines/android/HandlerContext;
public synthetic fun getImmediate ()Lkotlinx/coroutines/android/HandlerDispatcher;
public fun hashCode ()I
public fun invokeOnTimeout (JLjava/util/concurrent/TimeUnit;Ljava/lang/Runnable;)Lkotlinx/coroutines/experimental/DisposableHandle;
public fun isDispatchNeeded (Lkotlin/coroutines/experimental/CoroutineContext;)Z
public fun scheduleResumeAfterDelay (JLjava/util/concurrent/TimeUnit;Lkotlinx/coroutines/experimental/CancellableContinuation;)V
public fun invokeOnTimeout (JLjava/util/concurrent/TimeUnit;Ljava/lang/Runnable;)Lkotlinx/coroutines/DisposableHandle;
public fun isDispatchNeeded (Lkotlin/coroutines/CoroutineContext;)Z
public fun scheduleResumeAfterDelay (JLjava/util/concurrent/TimeUnit;Lkotlinx/coroutines/CancellableContinuation;)V
public fun toString ()Ljava/lang/String;
}

public final class kotlinx/coroutines/experimental/android/HandlerContextKt {
public static final synthetic fun asCoroutineDispatcher (Landroid/os/Handler;)Lkotlinx/coroutines/experimental/android/HandlerContext;
public static final fun getUI ()Lkotlinx/coroutines/experimental/android/HandlerContext;
public final class kotlinx/coroutines/android/HandlerContextKt {
public static final synthetic fun asCoroutineDispatcher (Landroid/os/Handler;)Lkotlinx/coroutines/android/HandlerContext;
public static final fun getUI ()Lkotlinx/coroutines/android/HandlerContext;
}

public abstract class kotlinx/coroutines/experimental/android/HandlerDispatcher : kotlinx/coroutines/experimental/CoroutineDispatcher, kotlinx/coroutines/experimental/Delay {
public fun delay (JLjava/util/concurrent/TimeUnit;Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;
public abstract fun getImmediate ()Lkotlinx/coroutines/experimental/android/HandlerDispatcher;
public fun invokeOnTimeout (JLjava/util/concurrent/TimeUnit;Ljava/lang/Runnable;)Lkotlinx/coroutines/experimental/DisposableHandle;
public abstract class kotlinx/coroutines/android/HandlerDispatcher : kotlinx/coroutines/CoroutineDispatcher, kotlinx/coroutines/Delay {
public fun delay (JLjava/util/concurrent/TimeUnit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun getImmediate ()Lkotlinx/coroutines/android/HandlerDispatcher;
public fun invokeOnTimeout (JLjava/util/concurrent/TimeUnit;Ljava/lang/Runnable;)Lkotlinx/coroutines/DisposableHandle;
}

public final class kotlinx/coroutines/experimental/android/HandlerDispatcherKt {
public static final fun asCoroutineDispatcher (Landroid/os/Handler;)Lkotlinx/coroutines/experimental/android/HandlerDispatcher;
public static final fun awaitFrame (Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;
public static final fun getMain (Lkotlinx/coroutines/experimental/Dispatchers;)Lkotlinx/coroutines/experimental/android/HandlerDispatcher;
public final class kotlinx/coroutines/android/HandlerDispatcherKt {
public static final fun asCoroutineDispatcher (Landroid/os/Handler;)Lkotlinx/coroutines/android/HandlerDispatcher;
public static final fun awaitFrame (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun getMain (Lkotlinx/coroutines/Dispatchers;)Lkotlinx/coroutines/android/HandlerDispatcher;
}

Loading

0 comments on commit 4da16c9

Please sign in to comment.