logoalt Hacker News

loegyesterday at 11:12 PM1 replyview on HN

Spinlocks are unsuitable for situations where you can be involuntarily context switched (the vast majority of userspace programs). Probably worth mentioning that.


Replies

josefxtoday at 9:34 AM

Unsuitable? Probably depends on your use case. Even a normal end user system shouldn't constantly kick your threads out unless it has enough other things to do to to keep every core busy.