All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.internal.Sharing.common.kt Maven / Gradle / Ivy

There is a newer version: 1.10.1
Show newest version
/*
 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package kotlinx.coroutines.internal

import kotlinx.coroutines.*
import kotlin.coroutines.*

internal expect open class ShareableRefHolder()
internal expect fun ShareableRefHolder.disposeSharedRef()
internal expect fun  T.asShareable(): DisposableHandle where T : DisposableHandle, T : ShareableRefHolder
internal expect fun CoroutineDispatcher.asShareable(): CoroutineDispatcher
internal expect fun  Continuation.asShareable() : Continuation
internal expect fun  Continuation.asLocal() : Continuation
internal expect fun  Continuation.asLocalOrNull() : Continuation?
internal expect fun  Continuation.asLocalOrNullIfNotUsed() : Continuation?
internal expect fun  Continuation.useLocal() : Continuation
internal expect fun  Continuation.shareableInterceptedResumeCancellableWith(result: Result)
internal expect fun  Continuation.shareableInterceptedResumeWith(result: Result)
internal expect fun disposeContinuation(cont: () -> Continuation<*>)
internal expect fun  CancellableContinuationImpl.shareableResume(delegate: Continuation, useMode: Int)

internal expect fun  (suspend (T) -> R).asShareable(): suspend (T) -> R

internal expect fun isReuseSupportedInPlatform(): Boolean
internal expect fun  ArrayList.addOrUpdate(element: T, update: (ArrayList) -> Unit)
internal expect fun  ArrayList.addOrUpdate(index: Int, element: T, update: (ArrayList) -> Unit)
internal expect fun Any.weakRef(): Any
internal expect fun Any?.unweakRef(): Any?




© 2015 - 2025 Weber Informatics LLC | Privacy Policy