[–] dalvrosa 1d ago ↗ Thanks for sharing! Happy to get feedback :)Note that I don't recommend spinlock for most cases, only when there is a 1:1 mapping between threads and phsycal CPU cores, and only after measuring
[–] hn45e7pbij 1d ago ↗ One thing I had to learn the hard way is that a spin lock is a bad fit the moment your threads can be preempted mid critical section. Under oversubscription you're spinning against a thread that isn't even scheduled.
2 comments
[ 0.19 ms ] story [ 8.1 ms ] threadNote that I don't recommend spinlock for most cases, only when there is a 1:1 mapping between threads and phsycal CPU cores, and only after measuring