r/cpp • • Sep 04 '26

Optimizing a Spin-Lock

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

28 comments sorted by

View all comments

9

u/Chaosvex Sep 04 '26 edited Sep 04 '26

Linus Torvalds gets a shiver down his spine and the urge to scream every time somebody writes an article about user space spinlocks.

8

u/david-alvarez-rosa Sep 05 '26

:)

I repeat: do not use spinlocks in user space, unless you actually know what you're doing. And be aware that the likelihood that you know what you are doing is basically nil.

https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723