Hacker News new | ask | show | jobs
by dwohnitmok 1657 days ago
Is it particularly costly compared to locks?

Under the hood it's a effectively a single CAS instruction that loops on failure (which only occurs under contention, but then you have waiting with locks too).