Created
August 13, 2022 19:53
-
-
Save aleksandarzekovic/8f44a2bcf2ba3bbe78dd8671f9c0aa34 to your computer and use it in GitHub Desktop.
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
@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