mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-24 20:43:33 +08:00
Ensure binary compatibility, apiDump
This commit is contained in:
parent
6cfd7a34ca
commit
0a59a6d405
binary-compatibility-validator/api
mirai-core-api/src/commonMain/kotlin/event
@ -1815,7 +1815,10 @@ public final class net/mamoe/mirai/event/MessageSubscribersBuilder$ListeningFilt
|
||||
public final class net/mamoe/mirai/event/NextEventKt {
|
||||
public static final synthetic fun nextBotEventImpl (Lnet/mamoe/mirai/Bot;Lkotlin/reflect/KClass;Lkotlinx/coroutines/CoroutineScope;Lnet/mamoe/mirai/event/EventPriority;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final synthetic fun nextEventImpl (Lkotlin/reflect/KClass;Lkotlinx/coroutines/CoroutineScope;Lnet/mamoe/mirai/event/EventPriority;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun parentJob (Lnet/mamoe/mirai/event/EventChannel;Lkotlinx/coroutines/Job;)Lnet/mamoe/mirai/event/EventChannel;
|
||||
public static final synthetic fun withTimeoutOrCoroutineScope (JLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final synthetic fun withTimeoutOrCoroutineScope (JLkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun withTimeoutOrCoroutineScope$default (JLkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class net/mamoe/mirai/event/SelectKt {
|
||||
|
@ -134,4 +134,20 @@ internal suspend inline fun <R> withTimeoutOrCoroutineScope(
|
||||
} else {
|
||||
withTimeout(timeoutMillis, block)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmSynthetic
|
||||
@PublishedApi
|
||||
@Deprecated("For binary compatibility", level = DeprecationLevel.HIDDEN)
|
||||
internal suspend inline fun <R> withTimeoutOrCoroutineScope(
|
||||
timeoutMillis: Long,
|
||||
noinline block: suspend CoroutineScope.() -> R
|
||||
): R {
|
||||
require(timeoutMillis == -1L || timeoutMillis > 0) { "timeoutMillis must be -1 or > 0 " }
|
||||
|
||||
return if (timeoutMillis == -1L) {
|
||||
coroutineScope(block)
|
||||
} else {
|
||||
withTimeout(timeoutMillis, block)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user