ParentFull threadBenoitP·Compare-and-swap is a hardware instruction, and beyond that a desirable pattern for dealing with concurrent writes.CMPXCHGhttps://www.felixcloutier.com/x86/cmpxchghttps://lwn.net/Articles/847973/View on HN