Last active
May 6, 2017 07:46
-
-
Save shoheiyokoyama/32c985bbcfe70cdc2622b9b76feaa92b to your computer and use it in GitHub Desktop.
DispatchWorkItem perform
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
let workItem = DispatchWorkItem { | |
sleep(1) | |
print("done") | |
} | |
workItem.perform() // Execute synchronously | |
print("after perfrom") | |
//done | |
//after perfrom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment