Gets the current value of an atomic variable.
This method is thread-safe. Implements a full memory barrier.