How efficient is the @ThreadSafe property wrapper?

We recently migrated our project to the Swift Concurrency framework. However there are places were we end up with Realm accessed from incorrect thread. errors.
An easy fix for this kind of issue would be to use the @ThreadSafe property wrapper but we were wondering if there were some drawbacks to using it (like with the frozen objects) ?

The only drawback is that there is the extra step of @ThreadSafe having to resolve its internal ThreadSafeReference. This is generally a nonissue though.

1 Like