Skip to content

Instantly share code, notes, and snippets.

@LucianoPAlmeida
Last active July 20, 2019 21:04
Show Gist options
  • Save LucianoPAlmeida/308ff5db20073acbe3fc3e3f8ec02d89 to your computer and use it in GitHub Desktop.
Save LucianoPAlmeida/308ff5db20073acbe3fc3e3f8ec02d89 to your computer and use it in GitHub Desktop.
Kotlin coroutines
// 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