Created
October 21, 2021 19:28
-
-
Save asilturk/f4fba598b8748faa83cc932c062c36d9 to your computer and use it in GitHub Desktop.
DispatchQueue
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
// main queue | |
DispatchQueue.main | |
// high priority global queue | |
DispatchQueue.global(qos: .userInteractive) | |
// low priority global queue | |
DispatchQueue.global(qos: .background) | |
// private serial queue | |
let serialQueue = DispatchQueue(label: "private serial queue") | |
// private concurrent queue | |
let concurrentQueue = DispatchQueue(label: "concurrent queue", attributes: .concurrent) | |
// private serial queue with low priority | |
let serialQueueLowPriority = DispatchQueue(label: "serial queue lp", qos: .background) | |
// private concurrent queue with high priority | |
let concurrentQueueHighPriority = DispatchQueue(label: "concurrent hp", qos: .userInteractive, attributes: .concurrent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment