r/programming • u/david-alvarez-rosa • Sep 09 '26
Optimizing a Spin-Lock
https://david.alvarezrosa.com/posts/optimizing-a-spin-lock/
183
Upvotes
r/programming • u/david-alvarez-rosa • Sep 09 '26
View all comments
Show parent comment
4
u/david-alvarez-rosa Sep 09 '26
They are specially useful when the server is fully controlled, and there is a 1:1 mapping between threads and physical cores
So each thread is pinned to a dedicated CPU, and each CPU only runs one single thread