Skip to content

Commit e3ab2a6

Browse files
committed
Add ExperimentalCoroutineDispatcher to binary compatibility check, restore binary compatibility in Ktor
1 parent 9232732 commit e3ab2a6

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

binary-compatibility-validator/reference-public-api/kotlinx-coroutines-core.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,23 @@ public final class kotlinx/coroutines/channels/TickerMode : java/lang/Enum {
700700
public static fun values ()[Lkotlinx/coroutines/channels/TickerMode;
701701
}
702702

703+
public class kotlinx/coroutines/scheduling/ExperimentalCoroutineDispatcher : kotlinx/coroutines/ExecutorCoroutineDispatcher {
704+
public synthetic fun <init> (II)V
705+
public synthetic fun <init> (IIILkotlin/jvm/internal/DefaultConstructorMarker;)V
706+
public fun <init> (IIJLjava/lang/String;)V
707+
public synthetic fun <init> (IIJLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
708+
public fun <init> (IILjava/lang/String;)V
709+
public synthetic fun <init> (IILjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
710+
public final fun blocking (I)Lkotlinx/coroutines/CoroutineDispatcher;
711+
public static synthetic fun blocking$default (Lkotlinx/coroutines/scheduling/ExperimentalCoroutineDispatcher;IILjava/lang/Object;)Lkotlinx/coroutines/CoroutineDispatcher;
712+
public fun close ()V
713+
public fun dispatch (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
714+
public fun dispatchYield (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
715+
public fun getExecutor ()Ljava/util/concurrent/Executor;
716+
public final fun limited (I)Lkotlinx/coroutines/CoroutineDispatcher;
717+
public fun toString ()Ljava/lang/String;
718+
}
719+
703720
public abstract interface class kotlinx/coroutines/selects/SelectBuilder {
704721
public abstract fun invoke (Lkotlinx/coroutines/selects/SelectClause0;Lkotlin/jvm/functions/Function1;)V
705722
public abstract fun invoke (Lkotlinx/coroutines/selects/SelectClause1;Lkotlin/jvm/functions/Function2;)V

binary-compatibility-validator/resources/api.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ module.roots=core integration native reactive ui
66
module.marker=build.gradle
77
module.ignore=kotlinx-coroutines-rx-example stdlib-stubs
88

9-
packages.internal=kotlinx.coroutines.internal kotlinx.coroutines.scheduling
9+
packages.internal=kotlinx.coroutines.internal

core/kotlinx-coroutines-core/src/scheduling/Dispatcher.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package kotlinx.coroutines.scheduling
77
import kotlinx.atomicfu.*
88
import kotlinx.coroutines.*
99
import kotlinx.coroutines.internal.*
10-
import java.lang.UnsupportedOperationException
1110
import java.util.concurrent.*
1211
import kotlin.coroutines.*
1312

@@ -43,12 +42,13 @@ open class ExperimentalCoroutineDispatcher(
4342
corePoolSize: Int = CORE_POOL_SIZE,
4443
maxPoolSize: Int = MAX_POOL_SIZE,
4544
schedulerName: String = DEFAULT_SCHEDULER_NAME
46-
) : this(
47-
corePoolSize,
48-
maxPoolSize,
49-
IDLE_WORKER_KEEP_ALIVE_NS,
50-
schedulerName
51-
)
45+
) : this(corePoolSize, maxPoolSize, IDLE_WORKER_KEEP_ALIVE_NS, schedulerName)
46+
47+
@Deprecated(message = "Binary compatibility for Ktor 1.0-beta", level = DeprecationLevel.HIDDEN)
48+
constructor(
49+
corePoolSize: Int = CORE_POOL_SIZE,
50+
maxPoolSize: Int = MAX_POOL_SIZE
51+
) : this(corePoolSize, maxPoolSize, IDLE_WORKER_KEEP_ALIVE_NS)
5252

5353
override val executor: Executor
5454
get() = coroutineScheduler

0 commit comments

Comments
 (0)