Created
June 15, 2016 09:07
-
-
Save zhxnlai/cc845a953132afb79bbbb4eea6545f4c to your computer and use it in GitHub Desktop.
Async Task Composing
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
Task { | |
print(“downloading image”) | |
var image = UIImage(data: downloadImage.await())! | |
updateImageView(image).await(.Main) | |
print(“processing image”) | |
image = processImage(image).await() | |
updateImageView(image).await(.Main) | |
print(“finished”) | |
}.async() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment