Created
October 13, 2015 18:51
-
-
Save jpiche/64aab7e00185829400a7 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
| // | |
| // Threading.swift | |
| // | |
| import Foundation | |
| private let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT | |
| func async(closure: () -> ()) { | |
| dispatch_async(dispatch_get_global_queue(priority, 0), closure) | |
| } | |
| func main(closure: () -> ()) { | |
| dispatch_async(dispatch_get_main_queue(), closure) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment