Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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