Subscribe to Jacob’s Tech Tavern for free to get ludicrously in-depth articles on iOS, Swift, tech, & indie projects in your inbox every week.
Full subscribers unlock Quick Hacks, my advanced tips series, and enjoy my long-form articles 3 weeks before anyone else.
To celebrate becoming a Substack bestseller this week, I’m offering a 25% discount.
Swift 6 and iOS 18 introduced the Synchronization framework, to surprisingly little fanfare. Seriously, barely even a shout-out at dub-dub. I have my work cut out for me.
Synchronization contains two low-level concurrency primitives — Mutex and Atomics.
These features could only be introduced with Swift 6 because they are implemented using the brand-new generic ownership mechanics.
Today, we’ll understand why atomics and mutexes are useful, and learn how to use them in your own code.
Finally, we’ll profile these primitives to understand their performance compared to the high-level synchronization mechanism in Swift Concurrency: Actors.
Keep reading with a 7-day free trial
Subscribe to Jacob’s Tech Tavern to keep reading this post and get 7 days of free access to the full post archives.