原始内容
Fucking Approachable Swift Concurrency
A no-bullshit guide to understanding Swift concurrency. Learn async/await, actors, Sendable, and MainActor with simple mental models.
About
Swift concurrency can be confusing. This site distills the best resources into clear, approachable mental models that anyone can understand.
In the tradition of fuckingblocksyntax.com and fuckingifcaseletsyntax.com.
Topics Covered
- Async/Await - Suspension vs blocking, and why it matters
- Tasks - Managing async work with Task and TaskGroup
- Isolation - The core mental model for Swift concurrency (MainActor, actors, nonisolated)
- Sendable - What can safely cross isolation boundaries
- Isolation Inheritance - How isolation flows through your code
- Common Mistakes - And how to avoid them
Languages
Available in 14 languages: English, Spanish, Ukrainian, Portuguese (BR & PT), Arabic, Korean, Japanese, Chinese (Simplified & Traditional), Russian, Turkish, French and Polish.
Development
This site is built with Eleventy.
Prerequisites
- mise (for managing Node.js and pnpm)
Setup
mise install
pnpm install
Development Server
pnpm dev
Then open http://localhost:8080/ in your browser.
Build
pnpm build
Credits
Much of this guide is distilled from Matt Massicotte's excellent work on Swift concurrency.
License
MIT License - see LICENSE.md
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Akshay 🖋 |
Peter's Path 🖋 |
Sébastien Stormacq 🖋 |
Ertan 📖 |
Vikram Kriplaney 🖋 |
Krzysztof 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!