jsMain.Builders.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlinx-coroutines-core-js Show documentation
Show all versions of kotlinx-coroutines-core-js Show documentation
Coroutines support libraries for Kotlin
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package kotlinx.coroutines
import kotlinx.coroutines.intrinsics.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
@Suppress("NOTHING_TO_INLINE") // Save an entry on call stack
internal actual inline fun startCoroutine(
start: CoroutineStart,
receiver: R,
completion: Continuation,
noinline block: suspend R.() -> T
) =
startCoroutineImpl(start, receiver, completion, block)
@Suppress("NOTHING_TO_INLINE") // Save an entry on call stack
internal actual inline fun saveLazyCoroutine(
coroutine: AbstractCoroutine,
receiver: R,
noinline block: suspend R.() -> T
): Any =
block.createCoroutineUnintercepted(receiver, coroutine)
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST") // Save an entry on call stack
internal actual inline fun startLazyCoroutine(
saved: Any,
coroutine: AbstractCoroutine,
receiver: R
) =
(saved as Continuation).startCoroutineCancellable(coroutine)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy