Iaroslav Popov
@iaroslaw
1 post

Why you should stop using @ThreadSafe in Swift

A few months ago, while tracking down a stubborn runtime crash in an iOS project, I noticed the use of a @ThreadSafe property wrapper. At first glance, it promised a convenient shortcut — simply annotate your properties, and poof, your code is safe. It’s no wonder these wrappers became popular when property wrappers were first introduced in Swift, offering an elegant way to simplify thread safety. However, despite the promise, the crashes persisted. Intrigued, I reached out to some friends and colleagues, and they mentioned that many projects employ similar approaches — sometimes called @Atomic, @Synchronized, or other variants. That realization prompted me to dig deeper and write this article.