What is Grand Central Dispatch?
suggest changeWhat is Concurrency?
- Doing multiple things at the same time.
- Taking advantage of number of cores available in multicore CPUs.
- Running multiple programs in parallel.
Objectives of Concurrency
- Running program in background without hogging CPU.
- Define Tasks, Define Rules and let the system take the responsibility of performing them.
- Improve responsiveness by ensuring that the main thread is free to respond to user events.
DISPATCH QUEUES
Grand Central Dispatch queues run blocks asynchronously or synchronously. Dispatch queues are first-in, first-out: tasks start in the order they were added. A concurrent queue may run more than one task at a time, but it still starts them in order.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents