Skip to content
rebeloper edited this page Jul 12, 2026 · 2 revisions

This tutorial walks through Grand Central Dispatch (GCD) in a carefully structured progression:

🥚 Foundations

  1. Why GCD Exists
  2. Thread vs Queue
  3. Queue (Serial vs Concurrent)
  4. Sync vs Async
  5. Main Queue & Global Queues

🧑‍🍽️ Core Concepts

  1. Quality of Service (QoS)
  2. DispatchWorkItem
  3. Deadlocks
  4. Delaying Work (asyncAfter / DispatchTime)

⚡ Coordination

  1. DispatchGroup
  2. DispatchSemaphore
  3. Barriers
  4. Target Queues

🔒 Safety & Data Flow

  1. Data Races & Thread Safety
  2. Locks (NSLock / os_unfair_lock)
  3. The Thread Explosion Problem

🧠 Advanced Control

  1. concurrentPerform
  2. DispatchSource (timers & monitoring)
  3. Cancellation in GCD

🌊 Real-World Patterns

  1. Callback Chains & Callback Hell
  2. Common GCD Gotchas

🎓 Wrap-up

  1. How Everything Fits Together
  2. From GCD to Swift Concurrency

By following this path, you'll go from:

👉 "GCD is a pile of confusing APIs 😵" to 👉 "I understand the mechanics async/await is built on 💡"

This is a companion series to SwiftConcurrencyExplained — read this one first for the low-level foundation, then that one for the modern high-level model.

Clone this wiki locally