Skip to content

Instantly share code, notes, and snippets.

@malcommac
Created July 28, 2016 19:47
Show Gist options
  • Select an option

  • Save malcommac/bbd72cbc21f1ab2850e7661a2d655571 to your computer and use it in GitHub Desktop.

Select an option

Save malcommac/bbd72cbc21f1ab2850e7661a2d655571 to your computer and use it in GitHub Desktop.
Chain Task with ThenAsync and use the result of a task
downloadImage(imgURL, in: .Background).then { image in
saveToDisk("myImage", image: image, in: .Background) }.then { url in
print("Image from \(imgURL) is now saved in \(url)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment