Convenient wrapper around os_unfair_lock and property warpper for atomic memory access on any apple platform.
let lock = UnfairLock()
lock.lock()
// ...
lock.unlock()
@ThreadSafe
var value = SomeType()
value.info.id += 1 // safe and atomic
Swift thread safety
Convenient wrapper around os_unfair_lock and property warpper for atomic memory access on any apple platform.
let lock = UnfairLock()
lock.lock()
// ...
lock.unlock()
@ThreadSafe
var value = SomeType()
value.info.id += 1 // safe and atomic
Swift thread safety
MIT License