Dev/rm volatile (#1007)

* Removing volatile and replacing with atomic to ensure atomicity

* compiling header include issue
This commit is contained in:
2024-10-23 12:39:03 +02:00
committed by GitHub
parent 37e65634d4
commit 60868ae74e
2 changed files with 5 additions and 4 deletions

View File

@ -434,7 +434,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
/** data streaming (down stream) enabled in client (zmq sckets created) */
bool client_downstream{false};
std::vector<std::unique_ptr<ZmqSocket>> zmqSocket;
volatile int numZmqRunning{0};
std::atomic<int> numZmqRunning{0};
/** mutex to synchronize main and data processing threads */
mutable std::mutex mp;