Created
January 9, 2017 12:49
-
-
Save leilee/84a65dd92c335e5ace26066ea726a7a7 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
public struct Queues { | |
static var GlobalMainQueue: dispatch_queue_t { | |
return dispatch_get_main_queue() | |
} | |
static var GlobalUserInteractiveQueue: dispatch_queue_t { | |
return dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0) | |
} | |
static var GlobalUserInitiatedQueue: dispatch_queue_t { | |
return dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0) | |
} | |
static var GlobalDefaultQueue: dispatch_queue_t { | |
return dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0) | |
} | |
static var GlobalUtilityQueue: dispatch_queue_t { | |
return dispatch_get_global_queue(QOS_CLASS_UTILITY, 0) | |
} | |
static var GlobalBackgroundQueue: dispatch_queue_t { | |
return dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment