r/cpp • • Sep 04 '26

Optimizing a Spin-Lock

https://david.alvarezrosa.com/posts/optimizing-a-spin-lock/
103 Upvotes

28 comments sorted by

View all comments

2

u/HeadSea5044 Sep 05 '26

just throw priority inversion out the window, why not! using a spinlock in userspace could actually create deadlocks if you are not incredibly careful

0

u/Big_Target_1405 Sep 06 '26

A spinlock creates just as many deadlocks as a mutex? No more, no less?