Understanding Actor Reentrancy in Swift: The Hidden Concurrency Trap

With the introduction of Swift Concurrency, Actors became the ultimate tool for protecting shared mutable state. By isolating their state and ensuring that only one task can access that state at a time, actors eliminate traditional data races. However, they introduce a new, subtle, and incredibly dangerous concept that trips up even experienced developers: Actor Reentrancy. If you assume that an actor behaves exactly like a serial DispatchQueue or an NSLock, you are going to write buggy code. Let’s explore what actor reentrancy is, why it breaks your logic, and how to fix it using a real-world banking scenario. ...

July 2, 2026 · 5 min