Last active
July 20, 2019 21:04
-
-
Save LucianoPAlmeida/308ff5db20073acbe3fc3e3f8ec02d89 to your computer and use it in GitHub Desktop.
Kotlin coroutines
This file contains hidden or 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
// func getUser(userid: String, continuation: Continuation) | |
suspend fun getUser(usid: String) { | |
// label: 0 | |
val token = apiToken(sm) | |
// label: 1 | |
val user = findUser(usid, sm.token, sm) | |
// label: 2 | |
// Do what you want with the user | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment