http://med.ngntfwmwovvku6eqi7dzzgzv2wzlvq2cqtqha7ccgzub2xnivsuxnuyd.onion/@tylerneely/fear-and-loathing-in-lock-free-programming-7158b1cdd50c
This is called “test and set” (TAS), “compare and swap”, or “compare and set” (CAS). The hardware makes sure that only one thread “wins” if several threads attempt a CAS at the same time.
2 similar results skipped