top of page


What Is Swift Concurrency?
What is Swift concurrency? A friendly guide an 8-year-old could follow: async/await, tasks, actors, the MainActor, Sendable and the runtime every iOS app runs on.

Matthew Thomas
8 hours ago9 min read


What Does the sending Keyword Mean in Swift?
The sending keyword lets a non-Sendable value cross into an actor safely in Swift 6. See what the compiler accepts and rejects, tested on Swift 6.2 and 6.4.

Matthew Thomas
10 hours ago7 min read


How Do I Debounce a Search Field With async/await in Swift?
Debounce search in SwiftUI with .task(id:) and Task.sleep: one request after typing stops and no stale results. Tested on Swift 6.2 and 6.4.

Matthew Thomas
1 day ago7 min read


How Do I Structure an iOS App So AI Can Read and Edit It?
AI tools and new hires both copy the patterns they find. Why a shared, predictable iOS layout like CFA helps them, and why Frankenstein Architecture confuses them.

Matthew Thomas
1 day ago7 min read


Can I Use Typed Throws With async Functions in Swift?
Yes: async throws(E) works in Swift 6. See where typed throws keeps its error type, where it widens to any Error, tested on Swift 6.2 and 6.4.

Matthew Thomas
2 days ago7 min read


When Should I Use withDiscardingTaskGroup in Swift?
Use withDiscardingTaskGroup when child tasks only cause effects. A discarding task group explained with SE-0381, tested memory numbers and error behaviour in Swift concurrency.

Matthew Thomas
3 days ago7 min read


Can a Property Be async in Swift?
Yes. Since SE-0310 a read-only computed property can be async or throws. See get async in protocols, actor snapshots and the exact compiler errors, tested on Swift 6.2.

Matthew Thomas
4 days ago6 min read


What Is an isolated Parameter in Swift?
What does an isolated parameter do in Swift? How isolated (any Actor)? = #isolation keeps a helper on its caller's actor, tested on Swift 6.2 and 6.4.

Matthew Thomas
5 days ago7 min read


How Do I Observe an @Observable Model With async/await in Swift?
How do you observe an @Observable model with async/await? Swift Observations (SE-0475), tested on Swift 6.2 and 6.4: first values, transactions, skipped values and ending the loop.

Matthew Thomas
5 days ago7 min read
![Do You Need [weak self] in a Swift Task?](https://static.wixstatic.com/media/dac5d1_90f6e3d729944c78a99e895a2e45452c~mv2.png/v1/fill/w_333,h_250,fp_0.50_0.50,q_35,blur_30,enc_avif,quality_auto/dac5d1_90f6e3d729944c78a99e895a2e45452c~mv2.webp)
![Do You Need [weak self] in a Swift Task?](https://static.wixstatic.com/media/dac5d1_90f6e3d729944c78a99e895a2e45452c~mv2.png/v1/fill/w_305,h_229,fp_0.50_0.50,q_95,enc_avif,quality_auto/dac5d1_90f6e3d729944c78a99e895a2e45452c~mv2.webp)
Do You Need [weak self] in a Swift Task?
Do you need [weak self] in a Swift Task? Tested on Swift 6.2 and 6.4: when strong self is fine, when a task causes a retain cycle and memory leak, and two fixes.

Matthew Thomas
5 days ago7 min read


How Do I Map Over an Array With Async Calls in Swift?
Swift async map explained: why map rejects await, a sequential asyncMap, and a task group concurrentMap that preserves order and limits concurrency.

Matthew Thomas
5 days ago7 min read


How Do I Make an Actor Conform to a Protocol in Swift?
Fix 'actor-isolated cannot satisfy nonisolated requirement': async protocol requirements, nonisolated Hashable and Identifiable, and protocols that refine Actor.

Matthew Thomas
6 days ago7 min read


What Is isolated deinit in Swift, and When Do You Need It?
Why a @MainActor class's deinit isn't isolated, what Swift 6.2's isolated deinit changes, when the cleanup runs, and the rules the compiler enforces, with tested code.

Matthew Thomas
6 days ago7 min read


How Do I Retry an Async Function With Exponential Backoff in Swift?
Retry async/await calls in Swift without hammering a server: exponential backoff with jitter, which errors to retry, and cancellation, with tested results.

Matthew Thomas
6 days ago7 min read


How Do I Share One AsyncStream With Several Consumers in Swift?
Two loops on one AsyncStream split its values. Learn the queue-not-radio model, build a per-subscriber broadcaster, and compare it with AsyncAlgorithms share().

Matthew Thomas
6 days ago7 min read


How Do I Add a Timeout to an Async Function in Swift?
Add a timeout to async code in Swift with a task group race, see why cancellation decides when it returns, share one deadline, and meet SE-0526 withDeadline.

Matthew Thomas
6 days ago7 min read


How Do I Fix 'Main Actor-Isolated Property Can Not Be Referenced From a Nonisolated Context'?
Fix 'main actor-isolated property can not be referenced from a nonisolated context' in Swift 6 with four compiled fixes and a snapshot pattern.

Matthew Thomas
Oct 296 min read


How Does SwiftUI's .task Cancel When a View Disappears?
SwiftUI .task cancels when the view disappears or its id changes. Cancellation is cooperative — check isCancelled, sleep throws, and onAppear Task does not auto-cancel.

Matthew Thomas
Oct 296 min read


How Do I Make a Custom AsyncSequence in Swift?
Build a custom AsyncSequence in Swift: why for await pulls values with next(), a paged API example, lazy operators, next(isolation:) and the iterator rules.

Matthew Thomas
Oct 297 min read


What is the Main Thread?
3DaysOfSwiftConcurrency.com Free online Swift Concurrency tutorials. What Is the Main Thread? Every iOS application begins with a main thread. The main thread is an execution context used for much of the work that directly affects the application interface. Touch handling, view updates, layout, animation coordination and changes to UI-facing state all depend on the main execution domain remaining available. This is why iOS developers so often discuss blocking the main thread.

Matthew Thomas
Aug 1136 min read
bottom of page