Re:Hell is a multi-threaded C++ program (2006)
by whatidonteven on Monday September 04, 2017 @08:23AM
(#15167709)
There's a bit of a terminology confusion here. When they say "spinlock", most people mean a pure spinlock that spins forever until it succeeds.
"Mutex" on the other hand might have a fast-path that spins a few times before inserting the thread onto a wait list.
Re:Hell is a multi-threaded C++ program (2006)
by mannykannot on Sunday September 03, 2017 @10:54AM
(#15161718)
I think the warning is directed against rolling your own spinlocks without careful consideration, including a realistic evaluation of whether you know every issue involved in doing so.
If you ever used pthread_mutex with glibc then you use spinlocks without knowing it. The implementation spins for some time before going for a full kernel mutex.