Reza Bina · Berlin
reza-bina.com
The iOS Interview Field GuideField Guide

Part V

Swift Concurrency

9 chapters · 64 min

Threads, tasks, actors and isolation — built up from first principles, with the mechanism from Apple's own material. Answers the three questions that stay confusing: what an actor really is, how it differs from a thread, and why @MainActor is not the main thread.

  • 01Why concurrency exists6 minCores, threads, and the two genuinely different reasons one thread isn't enough.
  • 02What went wrong before5 minCallbacks, GCD thread explosion, locks — and the single root cause underneath all three.
  • 03Tasks, async and await8 minThe move that makes everything else possible — separating the work from the worker.
  • 04Actors9 minWhat an actor is, and the difference between an actor and a thread.
  • 05Reentrancy7 minThe honest limitation — an actor stops data races, not the world moving while you wait.
  • 06Isolation, and why @MainActor is not the main thread10 minIsolation domains are compile-time; threads are runtime. Four reasons they're not the same.
  • 07Sendable6 minWhat is allowed to cross a boundary — and the two separate jobs the one keyword does.
  • 08Structured concurrency and cancellation7 minChild tasks that cannot outlive their parent, and why cancellation is a flag rather than a kill.
  • 09The decision guide6 minApple's ladder, the full map, and the questions to answer out loud.