What problem does it solve?
Concurrency bugs in Apple platforms—deadlocks, thread explosion, and data races—are costly and hard to diagnose. This Skill provides opinionated patterns, detection checklists, and migration guidance to write deterministic, thread-safe code using GCD, OperationQueue, locks, and Swift Concurrency.
Core Features & Use Cases
- Consolidates queue architecture into a small set of labeled subsystem queues and target hierarchies to avoid thread explosion.
- Provides AsyncOperation patterns, KVO-safe state management, barrier-based reader/writer patterns, and safe lock choices (NSLock/OSAllocatedUnfairLock) for short critical sections.
- Guides migration paths from GCD/OperationQueue to Swift Concurrency, including when to keep patterns like DispatchSource timers and how to bridge with continuations.
- Includes workflows for reviewing, refactoring, and testing concurrency code with TSan, tests, and CI considerations, plus guidance on debugging and monitoring.
Quick Start
Provide a production-ready GCD and OperationQueue concurrency plan for a Swift project.