Navigate Swift Concurrency reference topics
mainThe Swift Concurrency skill provides specialized documentation across several domains. Use the following categories to find specific guidance:
Foundations
- Async/Await Basics: Closure-to-async bridges and foundational usage.
- Tasks:
Taskmanagement, cancellation, task groups, and structured vs unstructured work. - Actors: Actor isolation,
@MainActor, reentrancy, and isolated conformances. - Sendable:
Sendableprotocols,@Sendableclosures, region isolation, and escape hatches. - Threading: Execution models, suspension points, and Swift 6.2 isolation behavior.
Streams
- Async Sequences: Deciding between
AsyncSequence,AsyncStream, and one-shot async APIs. - Async Algorithms: Using operators like
debounce,throttle,merge,combineLatest, channels, and timers.
Applied Topics
- Testing: Using Swift Testing (preferred) or XCTest, and performing leak checks.
- Performance: Instruments workflow, analyzing actor hops, and suspension costs.
- Memory Management: Handling retain cycles, long-lived tasks, and cleanup.
- Core Data: Managing
NSManagedObjectID,perform, and default isolation conflicts.
Migration and Tooling
- Migration: Rollout order, build settings, and migration guardrails.
- Linting: Concurrency-focused lint rules.
- Glossary: Quick definitions of concurrency terms.