swift-concurrency
Swift Concurrency Patterns
Expert guidance on Swift Concurrency best practices covering async/await, actors, tasks, Sendable, threading, memory management, testing, and migration strategies.
Rules
Core Swift Concurrency rules extracted as discrete, high-impact patterns. See rules index for the full list organized by:
- Async/Await Patterns - Never add dummy suspension points to silence warnings
- Actor Isolation - Use actors for data-race safety with compiler verification
- Task Lifecycle - Understand task cancellation and structured concurrency
- Sendable Conformance - Require Sendable for crossing concurrency boundaries
- Testing - Patterns for testing async concurrent code without flaky tests
References
See references/swift-concurrency.md for comprehensive guidance organized by:
- Async/Await Fundamentals - Core patterns, error handling, parallel execution
More from ravnhq/ai-toolkit
core-coding-standards
Universal code quality rules — KISS, DRY, clean code, code review. Base
81promptify
Transform user requests into detailed, precise prompts for AI models.
66lang-typescript
TypeScript language patterns and type safety rules — strict mode, no
53tech-react
React 19 patterns for components, hooks, Server Components, and data
52design-frontend
Visual design system patterns for web UIs. Tailwind CSS v4 design tokens
43platform-backend
Server-side architecture and security — API design, error handling, validation,
39