Original Post
At the moment, this is purely for self-edification. I was considering different locking mechanisms, and I came to the conclusion that the locking and unlocking routines could not be interrupted or else bad things could happen. When I looked up what a piece of code guaranteed to run uninterrupted was called, I ran into the term "atom". My question is, how would one implement a safe locking and unlocking mechanism in C++ with or without using an "atom", and if there are good methods which do not require "atoms", what are they? I am considering a hypothetical situation in which I would run multiple collision detection threads which incrementally run through a list of dynamic objects to check each against a static terrain quad tree.