4 ms·
Without any contention at all, a spinlock and a mutex are identical: a single compare-and-swap.
by NobodyNada 3y ago
Without any contention at all, a spinlock and a mutex are identical: a single compare-and-swap.
- gpderetta 3y agoTechnically you can use a release-store on a spinlock unlock path, but you need a CAS for a mutex.