-
-
Save tuchangwei/940c89b89af474f086fb to your computer and use it in GitHub Desktop.
GDC Demo
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
var group = dispatch_group_create() | |
var queue = dispatch_queue_create("me.tutuge.test.gcd", DISPATCH_QUEUE_CONCURRENT); | |
dispatch_group_async(group, queue, { () -> Void in | |
NSThread.sleepForTimeInterval(10) | |
println("First block done...") | |
}) | |
dispatch_group_async(group, queue, { () -> Void in | |
NSThread.sleepForTimeInterval(5) | |
println("Second block done...") | |
}) | |
dispatch_group_notify(group, queue) { () -> Void in | |
println("All Task Finish") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment