Closed yvbeek closed 2 years ago
Why is the wrapper called AtomicWrite
instead of Atomic
?
The documentation was referring to Atomic
I hope that I implemented the locks correctly 🙂
We should probably demonstrate that this is actually faster than DispatchQueue and that it doesn't leak or cause any threading issues.
Use
os_unfair_lock
if it is available, otherwise fall back topthread_mutex
.This should give a nice performance boost according to the tests in this article: https://www.cocoawithlove.com/blog/2016/06/02/threads-and-mutexes.html