To force atomic access to properties, I've been using the strategy described by objc.io in their blog post but I was expecting to replace the whole thing with a property wrapper once Swift 5.1 was released. The idea of an
@Atomic wrapper is also cited as an example in the proposal, so I thought it could be implemented, but it seems that you can't actually do that because you cannot ensure that read-write-read processes actually happen atomically (the objc.io blog post explains this bit pretty clearly).
But the same blog post links to a talk by @Ben_Cohen about the
modify accessor that could solve this problem. AFAICT the accessor is still private (referenced with
_modify) and cannot be used because it's still not possible to
yield anything. Are there updates on this? Is this supposed to ship when Swift gets concurrency primitives?