mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
SDK: Fix data races on the local semaphores
This commit is contained in:
committed by
Dennis Klein
parent
5d6184cd1a
commit
1c49dde668
@@ -30,11 +30,11 @@ struct Semaphore
|
||||
|
||||
auto Wait() -> void;
|
||||
auto Signal() -> void;
|
||||
auto GetCount() -> std::size_t;
|
||||
auto GetCount() const -> std::size_t;
|
||||
|
||||
private:
|
||||
std::size_t fCount;
|
||||
std::mutex fMutex;
|
||||
mutable std::mutex fMutex;
|
||||
std::condition_variable fCv;
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ struct SharedSemaphore
|
||||
|
||||
auto Wait() -> void;
|
||||
auto Signal() -> void;
|
||||
auto GetCount() -> std::size_t;
|
||||
auto GetCount() const -> std::size_t;
|
||||
|
||||
private:
|
||||
std::shared_ptr<Semaphore> fSemaphore;
|
||||
|
Reference in New Issue
Block a user