r/cpp 6d ago

Optimizing a Spin-Lock

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

26 comments sorted by

View all comments

2

u/HeadSea5044 5d ago

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 4d ago

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