Re:Hell is a multi-threaded C++ program (2006)
by Skunkleton on Saturday September 02, 2017 @08:33PM
(#15159029)
> Outside of hard realtime code, there's zero reason to use spin locks.
That is just not true. You _must_ use them in the case where the kernel is non-preemptable. Additionally, if the locked resource is held for a very short time, a spin lock is likely a more efficient choice than a traditional mutex.
That is just not true. You _must_ use them in the case where the kernel is non-preemptable. Additionally, if the locked resource is held for a very short time, a spin lock is likely a more efficient choice than a traditional mutex.