[Gradle] RestrictedLifecycleStages: Reuse ContinuationInterceptor as Key
^KT-34662 Verification Pending
This commit is contained in:
committed by
Space Team
parent
e76119b5eb
commit
9b8611ea9b
+1
-5
@@ -486,12 +486,8 @@ private class RestrictedLifecycleStages(
|
||||
private val lifecycle: KotlinPluginLifecycle,
|
||||
private val allowedStages: Set<Stage>,
|
||||
) : CoroutineContext.Element, ContinuationInterceptor {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
companion object Key : AbstractCoroutineContextKey<ContinuationInterceptor, RestrictedLifecycleStages>(
|
||||
ContinuationInterceptor, { it as? RestrictedLifecycleStages }
|
||||
)
|
||||
|
||||
override val key: CoroutineContext.Key<*> = Key
|
||||
override val key: CoroutineContext.Key<*> = ContinuationInterceptor
|
||||
|
||||
override fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T> = object : Continuation<T> {
|
||||
override val context: CoroutineContext
|
||||
|
||||
Reference in New Issue
Block a user