This question is related to this question, but I\'ve decided to simplify this one so that it\'s easier to answer. C++ concurrency: Variable visibility outside of mutexes