r/cpp • • Sep 04 '26

Optimizing a Spin-Lock

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

31 comments sorted by

View all comments

Show parent comment

5

u/david-alvarez-rosa Sep 04 '26

Fully agreed, thanks for the explanation. Spin locks are specially useful in fully controlled envrionments, with 1:1 mapping between threads and physical cores