Follow

How would you implement an instance variable in Swift that has to be thread-safely lazily initialized, but you also have code that depends on being called before it has been initialized, and needs to assert for that (thread-safely), what would you do? NSLock?

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!