Last active
March 20, 2022 23:53
-
-
Save KhomDrake/16d9039c790f5160747f4760f11dbcc5 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
suspend fun setupMovies(completion: Continuation<Any?>) { | |
class SetupMoviesStateMachine(completion: Continuation<Any?>): CoroutineImpl(completion) { | |
var token: Token? = null | |
var movies: List<Movie>? = null | |
var result: Any? = null | |
var label: Int = 0 | |
override fun invokeSuspend(result: Any?) { | |
this.result = result | |
setupMovies(this) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment