3 ms·
But wouldn't the same apply to condition variables, not just semaphores? Also I found another reference to that internal post here https://cohost.org/Catfish-M
by krackers 2y ago
But wouldn't the same apply to condition variables, not just semaphores?
Also I found another reference to that internal post here https://cohost.org/Catfish-Man/post/913314-a-love-letter-to-os https://cohost.org/Catfish-Man/post/913314-a-love-letter-to-...
- ninkendo 2y agoIt applies to any concurrency primitive that can be used across threads, yes. NSLock and os_unfair_lock can only be unlocked by the thread that locked them, so you can’t abuse them to turn async code into sync code in this manner in the first place. Basically people recommend os_unfair_lock because of what it can’t do.