I have a C++/Qt QThread worker thread, which stores its current status as an ENUM (e.g. values such as Working, Finished). Only the worker thread sets the ENUM.
I need to be able to read the status of the worker thread from another thread (the GUI thread), to display on the screen whether work is being done.
Is it safe to read/write the ENUM in one thread (worker), and read in other threads? Otherwise, should I use locking like QMutex in places where it is read/written?