Today, we’re going to look at the power of the old-school Thread APIs, and demonstrate how much it has in common with Tasks, the modern building block of Swift Concurrency.
Back when I was a fresh-faced junior, we had a really smart engineer on my team, Jeff. I asked him to explain iOS concurrency to my graduate cohort, and he explained there were 3 levels of abstraction:
Operation & OperationQueue at the top-level, with advanced functionality.
GCD as your bread-and-butter for basic concurrency workloads.
Thread for low-level precise management of actual threads.
My impostor-syndrome-riddled brain filled in the blanks: I knew any time I heard “low-level” it meant “for geniuses”.
The Thread API was out-of-bounds, for the really smart engineers.
Until today.
It wasn’t until I started writing this piece that I realised, a lot of the APIs available in Thread are copied by the Task in Swift Concurrency. By comparing them, we can understand both at a deeper level.
Paid members get lots of nice things:
⚓️ Access my full library of paywalled articles (including this one)
🚀 Read free articles a month before anyone else
🧵 Master concurrency with my full course and advanced training
🧑🚀 Get a free copy of my new eBook, “Land your iOS Tech Job”
❤️🩹 Support independent, sometimes funny, tech writing




