Hacker News new | ask | show | jobs
by heavenlyhash 4516 days ago
It's possible to perform compare-and-swaps in java just like it is in C. They compile right down to the same primitives that flip bits in metal: you'll get CMPXCHGL instructions (using x86_64 as an example) from the jvm just as you will from gcc.
1 comments

But those instructions are embedded within another construct.