Do I need a mutex if I'm only sharing an int between threads?
I have a multithreaded app with a thread that needs to access an int in the main thread that provides status information (e.g. playing or paused). This int may be set and read by either thread. Do I need a mutex around it if it's only an int? I understand the need for a mutex if say, a data buffer needs to be filled/read, but if it's only an integer value, do I still need the mutex?
Is it really possible that the integer could be "half-read" at some point, causing an error?