Swift Concurrency Blog
Each article describes a shared pain in learning modern concurrency
Learn Swift Concurrency through practical online tutorials and downloadable Xcode playgrounds. Each tutorial explains a real problem found in modern iOS development, then walks you through the code used to solve it.
Dark mode · Clear diagrams · Focused explanations · Less distraction.

Article
38
How to Learn Swift Concurrency
Learn Swift Concurrency from the ground up by understanding processes, threads, race conditions and the problems the modern concurrency runtime was designed to solve. Build the mental model first, then move into tasks, actors, executors and cooperative code.
Add a Title

Article
40
How Does the OS Switch Between Threads?
Learn how the operating system switches between threads, what a context switch actually does, and why thread execution can interleave unpredictably. Build the mental model that connects OS scheduling, race conditions and Swift Concurrency’s cooperative approach.
Add a Title

Article
41
How Does the CPU Process One Thread of Machine Instructions?
Learn how Swift code becomes machine instructions, how a CPU core executes work from a scheduled thread, and why one line of Swift is not necessarily one indivisible operation. Build the hardware-level mental model that makes race conditions and Swift Concurrency much easier to understand.
Add a Title

Article
42
How Many Threads Can Each iOS App Create?
GCD global queues can grow to approximately 64 worker threads — but that is not the same as saying an iOS process can contain only 64 threads. Learn what the 64-thread figure actually means, why threads consume resources, how thread explosion happens, and why Swift Tasks provide a better model for large amounts of asynchronous work.
Add a Title

Article
43
Does My App Process Provide a Default Thread?
Yes. Every iOS application begins execution with an initial thread — the main thread. Learn where the main thread comes from, how it fits inside your app's process, why UI work is associated with it, what the main run loop does, and how DispatchQueue.main and @MainActor relate to the same underlying execution architecture.
Add a Title

Article
44
What Plugs Into the Processor: a Process or the Thread?
A thread — not an entire process — provides the execution context that the OS schedules onto a CPU core. Learn how processes provide an app's memory environment, how threads execute within that process, what the OS actually schedules, and where GCD queues and Swift Tasks fit above the underlying processor architecture.
Add a Title

Article
45
Are Threads Grouped Together Globally in the OS or Are They Confined Inside Each App?
Threads belong to individual app processes, but the operating system schedules runnable threads from across the entire system onto available CPU cores. Learn how process ownership, shared memory, system-wide scheduling and Swift Concurrency fit together in one complete execution model.
Add a Title

Article
46
Why Does Swift Concurrency Need a Runtime?
Swift Concurrency needs a runtime because Tasks are not threads. Learn why the OS thread scheduler alone cannot provide Swift's Task, suspension, executor and actor-isolation model, and see how Swift's cooperative concurrency system fits above threads, the OS scheduler and CPU cores.
Add a Title

Article
47
What Actually Happens When a Swift Task Suspends?
Swift Concurrency changes how we think about progress. Learn why finishing one operation as quickly as possible can still produce a slow, jerky app, how suspension lets Tasks remain unfinished without blocking a thread, and why cooperative code is about allowing the whole application to keep making progress together.
Add a Title

Article
48
What Is an Executor in Swift Concurrency?
An executor is the Swift Concurrency service that executes eligible jobs. Learn how executors connect Tasks to system threads, why actors use serial executors, how MainActor reaches main-thread execution, and why an executor is not simply another thread or dispatch queue.
Add a Title

Article
49
How Does an Actor Execute Multiple Tasks Safely?
An actor safely handles multiple Tasks by serialising its actor-isolated jobs so that only one executes at a time. Learn what “serialise” actually means, why an actor is more than a lock around a stored property, and how await allows another Task to get a turn without sacrificing data-race safety.
Add a Title

Article
50
Does @MainActor Mean the Work Executes on the Main Thread?
Yes — MainActor-isolated work executes on the main thread. Learn how an async MainActor Task can execute on the main thread, suspend at await, free the main thread for other work, and later resume its MainActor-isolated continuation on the main thread again.
Add a Title

Article
51
What Are the Benefits of Swift Concurrency?
Swift Concurrency makes asynchronous iOS code safer, more structured and easier to reason about. Explore the benefits of Tasks, suspension, actors, MainActor, Sendable, structured concurrency, cancellation, compiler checking and cooperative execution.
Add a Title
end of articles.

















