Daily iOS
Concurrency

GCD basics

What is GCD (Grand Central Dispatch), and why do you hand work to a queue instead of creating threads yourself?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

GCD is a concurrency API: you put work (a closure) on a queue and a thread pool the system manages runs it. Leaving thread creation, lifetime, and count to the system avoids thread explosion and wasted context switches.

Share a question