Skip to content
aleclarson edited this page Oct 21, 2014 · 1 revision

Dispatcher holds references to all pre-made queues and allows you to make your own Queues.

It is also a concurrent queue for default-priority tasks.

You can access Dispatcher through the gcd global constant.


Pre-made Queues

gcd.main: The serial queue for the user interface. Learn more about the main queue.

gcd.high: The concurrent queue for high-priority tasks.

gcd.low: The concurrent queue for low-priority tasks.

gcd.background: The concurrent queue for zero-priority tasks.


How do I make my own Queues?

You must retain any Queues you create!

let serialQueue = gcd.serial()
let concurrentQueue = gcd.concurrent()
Clone this wiki locally