Created
November 11, 2023 22:13
-
-
Save af2905/0ab381ce8c3f500febe25078f2487f0a to your computer and use it in GitHub Desktop.
coroutine_start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kotlinx.coroutines | |
public enum class CoroutineStart { | |
@InternalCoroutinesApi | |
public operator fun <T> invoke(block: suspend () -> T, completion: Continuation<T>): Unit = | |
when (this) { | |
DEFAULT -> block.startCoroutineCancellable(completion) | |
ATOMIC -> block.startCoroutine(completion) | |
UNDISPATCHED -> block.startCoroutineUndispatched(completion) | |
LAZY -> Unit // will start lazily | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment