Closed. This question needs to be more focused. It is开发者_StackOverflow中文版 not currently accepting answers.
[EDIT NOTE: Noticed I had put the mutex creation in the constructor.Moved it and noticed no change.] [EDIT NOTE 2: I changed the call to app.exec in a trial run to
I have a class that has a state (a simple enum) and that is accessed from two threads. For chan开发者_高级运维ging state I use a mutex (boost::mutex). Is it safe to check the state (e.g. compare state