Skip to content

Instantly share code, notes, and snippets.

@pawegio
Created January 19, 2017 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawegio/310e776292f74ef92274c3cd47ae0a43 to your computer and use it in GitHub Desktop.
Save pawegio/310e776292f74ef92274c3cd47ae0a43 to your computer and use it in GitHub Desktop.
fun loadUser(id: Int) = async {
val user = api.getUser(id).await() // not blocking main thread
textView.text = "User: ${user.name}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment