Mutable State & Race Conditions
Protect shared mutable state across threads.
Shared State Is Risky
When two threads touch the same mutable state, timing decides the result. That unpredictability is the root of subtle bugs.
What a Race Is
A race condition happens when the outcome depends on which thread runs first. The same code can pass once and fail the next.
All lessons in this course
- The New Memory Manager Explained
- Main vs Background on iOS
- Mutable State & Race Conditions
- Debug Freezes & Threading Crashes