Created
January 19, 2017 22:45
-
-
Save pawegio/310e776292f74ef92274c3cd47ae0a43 to your computer and use it in GitHub Desktop.
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
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