Skip to content

Commit

Permalink
Restore binary compatibility of Executor.asCoroutineDispatcher
Browse files Browse the repository at this point in the history
Fixes #629
  • Loading branch information
elizarov authored and qwwdfsad committed Sep 28, 2018
1 parent 873e9a0 commit 18cc588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ public abstract class kotlinx/coroutines/experimental/ExecutorCoroutineDispatche
}

public final class kotlinx/coroutines/experimental/ExecutorsKt {
public static final synthetic fun asCoroutineDispatcher (Ljava/util/concurrent/Executor;)Lkotlinx/coroutines/experimental/CoroutineDispatcher;
public static final synthetic fun asCoroutineDispatcher (Ljava/util/concurrent/ExecutorService;)Lkotlinx/coroutines/experimental/CloseableCoroutineDispatcher;
public static final fun asCoroutineDispatcher (Ljava/util/concurrent/ExecutorService;)Lkotlinx/coroutines/experimental/ExecutorCoroutineDispatcher;
public static final fun from (Ljava/util/concurrent/Executor;)Lkotlinx/coroutines/experimental/CoroutineDispatcher;
Expand Down
5 changes: 5 additions & 0 deletions core/kotlinx-coroutines-core/src/Executors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public fun ExecutorService.asCoroutineDispatcher(): ExecutorCoroutineDispatcher
public fun Executor.asCoroutineDispatcher(): CoroutineDispatcher =
ExecutorCoroutineDispatcherImpl(this)

/** @suppress */
@JvmName("asCoroutineDispatcher")
@Deprecated(level = DeprecationLevel.HIDDEN, message = "binary compatibility")
public fun Executor.asCoroutineDispatcher0(): CoroutineDispatcher = asCoroutineDispatcher()

/**
* Converts an instance of [ExecutorService] to an implementation of [CloseableCoroutineDispatcher].
* @suppress **Deprecated**: Return type changed to [ExecutorCoroutineDispatcher].
Expand Down

0 comments on commit 18cc588

Please sign in to comment.