Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aleksandarzekovic/8e41234cf9278eb19a9f46dfd626a50d to your computer and use it in GitHub Desktop.
Save aleksandarzekovic/8e41234cf9278eb19a9f46dfd626a50d to your computer and use it in GitHub Desktop.
internal abstract class BaseContinuationImpl (...) {
// Implement resumeWith of Continuation
// It is final and cannot be overridden!
public final override fun resumeWith (result: Result<Any?>) {
// ...
val outcome = invokeSuspend(param)
// ...
}
// For implementation
protected abstract fun invokeSuspend (result: Result<Any?>) : Any?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment