Two threads using a same variable
问题 I have two threads: 'main' and 'worker', and one global variable bool isQuitRequested that will be used by the main thread to inform worker , when it's time to quit its while loop (something like this: while(isQuitRequested == false) { ... do some stuff ... } ) Now, I'm a bit concerned... Do I need to use some kind of mutex protection for isQuitRequested , considering that only one thread ( main ) performs isQuitRequested = true operation, and the other ( worker ) just performs checking and