News for hackers. Stuff that matters.
Re:The Fastest Mutexes by krackers on Monday October 07, 2024 @08:09PM (#41772491)
But wouldn't the same apply to condition variables, not just semaphores?
Re:The Fastest Mutexes by ninkendo on Wednesday October 09, 2024 @08:05AM (#41786958)
It 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.