Skip to content

Instantly share code, notes, and snippets.

@muzahid59
Created November 4, 2015 09:33
Show Gist options
  • Select an option

  • Save muzahid59/fee17ed96f4070172860 to your computer and use it in GitHub Desktop.

Select an option

Save muzahid59/fee17ed96f4070172860 to your computer and use it in GitHub Desktop.
Helper Variables for Getting Global Queues
var GlobalMainQueue: dispatch_queue_t {
return dispatch_get_main_queue()
}
var GlobalUserInteractiveQueue: dispatch_queue_t {
return dispatch_get_global_queue(Int(QOS_CLASS_USER_INTERACTIVE.value), 0)
}
var GlobalUserInitiatedQueue: dispatch_queue_t {
return dispatch_get_global_queue(Int(QOS_CLASS_USER_INITIATED.value), 0)
}
var GlobalUtilityQueue: dispatch_queue_t {
return dispatch_get_global_queue(Int(QOS_CLASS_UTILITY.value), 0)
}
var GlobalBackgroundQueue: dispatch_queue_t {
return dispatch_get_global_queue(Int(QOS_CLASS_BACKGROUND.value), 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment