top of page

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.

Tutorial Thumbnal w360-tiny.png

Article

​

Can You Draw Your App’s Architecture—and Explain Who Owns Each Feature?

Draw your iOS app architecture with CFA. Explain AppModel, feature ownership, task lifetime and shared state in a practical whiteboard challenge.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1

What is Concurrency?

Understand concurrency in Swift: how tasks make progress, how the runtime schedules work, and why suspension and cooperation keep iOS apps responsive.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

2

What is the Main Thread?

Understand the iOS main thread: how app execution begins, why UI work belongs there, and how blocking it prevents the interface from updating.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

3

Race Conditions

Learn how race conditions arise when concurrent operations share mutable state, how they differ from data races, and how serialization prevents lost updates.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

4

The Swift Concurrency Runtime

Explore how the Swift Concurrency runtime schedules tasks, jobs and executors, manages suspension and resumption, and cooperates with operating-system threads.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

5

Can I Delay Learning Swift Concurrency?

Learn why iOS developers need to understand Swift Concurrency now, how it fits with SwiftUI and existing code, and how to plan a safe, gradual migration.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

6

What is a Task in Swift?

Understand what a Swift Task represents, how it executes in periods, suspends at await, inherits context, and differs fundamentally from a thread.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

7

What Does Async Mean in Swift?

Learn exactly what async means in Swift, how it changes a function's contract, when suspension can occur, and why async does not create a task or thread.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

8

What Does Await Mean in Swift?

Understand what await means in Swift, how a task may suspend without blocking its thread, and why await is neither a pause nor a background-thread command.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

9

Blocking vs Suspension Points

Compare blocking and suspension in Swift, see how each affects threads and interface responsiveness, and learn why async code can still block an application.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

10

What is Cooperative Scheduling in Swift?

Learn how Swift's cooperative scheduler runs eligible jobs, why suspension creates scheduling opportunities, and how long synchronous work delays other tasks.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

12

What Is MainActor in Swift?

Learn how MainActor protects main-facing state, how isolation is inherited and crossed, and when to use type annotations or MainActor.run in Swift.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

13

What Is an Actor in Swift?

Learn how Swift actors protect mutable state through isolated access, why external calls require await, and why an actor is neither a task nor a thread.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

14

What is Actor Isolation in Swift?

Understand actor isolation in Swift: who may access protected state, when await marks a boundary crossing, and why isolation is about permission, not threads.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

15

What Is Sendable in Swift?

Learn how Sendable identifies values that can safely cross Swift concurrency boundaries, including value types, reference types and compiler enforcement.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

17

What Is @Sendable in Swift?

Learn how @Sendable marks closures that can safely cross concurrency boundaries, what they may capture, and how compiler checks prevent unsafe transfers.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

18

What Is Structured Concurrency in Swift?

Understand Swift structured concurrency, task trees, async let, parent-child lifetimes, cancellation, error propagation and bounded concurrent work.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

19

What Is a Task Group in Swift?

Learn how Swift task groups create a dynamic number of structured child tasks, return results in completion order and handle errors and cancellation.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

20

What Is Task Cancellation in Swift?

Understand cooperative task cancellation in Swift, how code observes cancellation, when to check before publishing results and who should own task lifetime.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

21

What Is an Unstructured Task in Swift?

Learn how unstructured Swift tasks created with Task {} outlive their scope, inherit context and require explicit ownership of results and cancellation.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

22

What Does Task Inheritance Mean in Swift?

Understand what Task {} inherits in Swift, including actor isolation, priority and task-local values, and why inherited context does not create a child task.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

23

What Is Task.detached in Swift?

Learn what Task.detached does in Swift, what context it does not inherit, how cancellation works, and when a detached task is the right tool.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

24

Does Task Run on a Background Thread in Swift?

Discover why Task does not automatically run on a background thread, how actor isolation and executors determine execution, and when synchronous work blocks.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

25

What Is Task Priority in Swift?

Understand Swift task priority as a scheduling hint, how priority is inherited or escalated, and why it cannot guarantee execution order or choose a thread.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

26

What Is a Child Task in Swift?

Learn how Swift child tasks are created with async let and task groups, remain bounded by their parent scope, and inherit cancellation, priority and context.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

27

What Are Task-Local Values in Swift?

Learn how Swift task-local values carry contextual information through async calls and child tasks, support tracing, and restore previous values after a scope.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

28

What Is Actor Reentrancy in Swift?

Understand actor reentrancy in Swift, how state can change across await despite data-race safety, and how to prevent stale assumptions when an actor resumes.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

29

What is a Logical Race in Swift Concurrency?

Learn how logical races occur when safe concurrent operations finish out of order, why actors do not prevent them, and how to enforce latest-result policies.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

30

What Does nonisolated Mean in Swift?

Learn what nonisolated means in Swift, which actor members can opt out of isolation, what state they may access and how it supports synchronous protocols.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

31

What Is a Global Actor in Swift?

Understand Swift global actors, how they isolate declarations across types and files, how to define one and when crossing the boundary requires await.

Add a Title

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

Article

39

What is a Process?

Understand what an iOS app process actually is, where the main thread lives, how threads access shared memory, and how your code ultimately reaches the processor. Build the foundation you need before moving into threads, race conditions and Swift Concurrency.

Add a Title

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

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

Tutorial Thumbnal w360-tiny.png

Article

52

What is Modern iOS Architecture?

Learn how modern iOS architecture organises product features, observable state, dependencies and asynchronous work to create responsive, maintainable SwiftUI applications.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

53

How to Build an iOS App with AI Using the CFA AI Toolkit

Want AI to build your iOS app? Give it a blueprint first. Install the free CFA AI Toolkit once, then ask for your app "Using CFA" and get a structured, tested Xcode project.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

54

Why Our First 4,000 Students Will Pay $49.99 for the Complete Programme

Why our first 4,000 students will pay $49.99 for the complete Swift Concurrency and AI training programme, and the community we want to build together.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

55

iOS Developer: Swift Concurrency Guide 2027

A 15-step iOS upskill plan for 2027: understand threads and memory, build cooperative Swift features, and use AI with a clear architectural model.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

56

Swift Is Making Development Easier. We Want to Make It Understandable.

Why we built the CFA AI Toolkit for iOS: understand Swift Concurrency, organise visible features and work with AI while staying in control of your app.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

57

“Using CFA for iOS, Restructure the Following Code”: Give Your AI an Architecture, Not Another Guess

Turn a tangled SwiftUI entry point into clear, testable features. A practical CFA walkthrough with SwiftData error handling and a reusable AI refactoring prompt.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

57

SwiftUI Views and ViewModels: The Boundary That Keeps iOS Apps Understandable

A clear mental model for the SwiftUI View–ViewModel boundary: disposable declarative screens, feature-backed ViewModels and CFA’s deliberately small dependency route.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

58

How to Spot a Frankenstein Architecture in iOS

Audit your iOS architecture with 12 warning signs: unowned Tasks, stale results, shared state and legacy GCD assumptions stitched into modern Swift code.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

59

Four Tools That Help iOS Developers Write Better Swift

Compare two AI agent skills, The Composable Architecture and SwiftLint. Choose practical help for concurrency, SwiftUI, architecture and code review.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1001

CFA Reference: Overview

A formal overview of Cooperative Feature Architecture (CFA) and the CFA AI Toolkit for iOS: what it is, the layer path, and where each rule lives.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1002

CFA Reference: Project Structure

The CFA folder layout for an Xcode project: View, AppModel, App Resources and Swift Extensions, with ownership-based grouping.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1003

CFA Reference: Layers

The six CFA layers, from View to External System, what each layer may know, and which direction calls and state travel.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1004

CFA Reference: AppModel Composition Root

What the CFA AppModel stores, how live() builds the graph, and how launch starts each Feature exactly once.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1005

CFA Reference: Features and Ownership

How a concrete CFA Feature owns domain data, operation state and errors, and why it has no protocol and is never a Manager.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1006

CFA Reference: Repositories and Persistence

How CFA repositories hide storage behind domain-language protocols, when to use a JSON cache or SwiftData, and how storage failures reach the Feature.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1007

CFA Reference: Isolation Defaults

How CFA isolates code in Swift 6: Features and ViewModels marked @MainActor by hand, actors for shared storage, and Sendable values between them.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1008

CFA Reference: Toolkit Skills

The eight AI skills and the Xcode Project Dashboard in the CFA AI Toolkit for iOS, and when to use each one.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1009

CFA Reference: Getting Started

How to install the CFA AI Toolkit for iOS skills and Xcode templates, confirm the installation, and choose a starting point.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1010

CFA Reference: Upgrading an Existing App

How CFA upgrades an existing iOS app from GCD and callbacks to Swift Concurrency: baseline, whole-app change, behaviour preservation and the change gate.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1011

CFA Reference: Glossary and Prohibited Patterns

CFA terms defined in one place, and the specification's list of prohibited patterns that reviews reject or refactor.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1012

CFA Reference: Decision Rules

A single list of CFA decision rules in the form “when X, do Y”, covering where code goes, ownership, tasks, persistence, errors, tests and upgrades.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1013

CFA Reference: ViewModels and Screens

How each CFA screen owns a private, dedicated ViewModel, what that ViewModel may hold, and how it depends on narrow Features.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1014

CFA Reference: Application Launch

How a CFA app starts shared work at the app delegate, keeps App.body structural, and never lets storage gate the first screen.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1015

CFA Reference: Task Ownership and Overlapping Calls

How CFA assigns an owner to every Task, shares or queues overlapping Feature calls, and handles cancellation and stale results.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1016

CFA Reference: Errors, Saves and Honest Failure

How CFA represents failures honestly: thrown domain errors, retained error state in Features, recoverable storage requests and never-lost edits.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1017

CFA Reference: Testing

How CFA tests the boundaries it advertises: one suite per ViewModel, named Feature tests, isolated AppModel graphs and deterministic doubles.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1018

CFA Reference: Troubleshooting Swift 6 Compiler Errors

Six common Swift 6 concurrency compiler errors, the exact message, why it happens, and the CFA fix for each.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1019

CFA Reference: Change and Review Gate

The CFA change gate: the route and ownership statement before implementation, the 23 invariants, the delivery checks and the completion record.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1020

CFA Reference: Review Checklist

The 20-question CFA review checklist from the specification. Every applicable answer must be yes before a change is accepted.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1021

CFA Reference: Xcode Templates

The three CFA Xcode project templates (CFA App, Habit Tracker and Day Streak), what each creates, and how they are installed and maintained.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1022

CFA Reference: Starter Apps

The CFA Starter Apps (Habit Tracker, Habit Tracker Pro and Todays Twenty): what each contains, how to open it, and how it relates to the templates.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1023

CFA Reference: Tutorial: A New App from the CFA App Template

A step-by-step tutorial: create a new iOS app from the CFA App template, read its structure, add a feature with an AI assistant, and pass the change gate.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1024

CFA Reference: Tutorial: Upgrading a Whole GCD App in One Move

A step-by-step tutorial: upgrade a whole iOS app from GCD and callbacks to CFA and Swift Concurrency in one change, from baseline to completion record.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1025

CFA Reference: FAQ

Answers to common questions about CFA and the CFA AI Toolkit for iOS: what it is, what it installs, isolation, persistence, testing and upgrades.

Add a Title

Tutorial Thumbnal w360-tiny.png

Article

1026

CFA Reference: Versions and Changelog

The CFA AI Toolkit for iOS release history from the repository changelog, and the Swift, Xcode and iOS versions its projects use.

Add a Title

end of articles.

bottom of page