diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-11 07:00:31 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-11 07:00:34 +0200 |
commit | d2f6d2976f50e7944b1582f022c7ba8dfbc0bfa7 (patch) | |
tree | f3e081677476726af0cb6f8d925a610f53c95ec1 /src | |
parent | 4a267057617a8aa6dc9793c4d711725df5338025 (diff) | |
parent | 34b04eec4448bd37a8dbf560e4d99c7e7ca7e9c0 (diff) | |
download | bitcoin-d2f6d2976f50e7944b1582f022c7ba8dfbc0bfa7.tar.xz |
Merge bitcoin/bitcoin#21895: refactor: Add TSA annotations to the WorkQueue class members
34b04eec4448bd37a8dbf560e4d99c7e7ca7e9c0 refactor: Add TSA annotations to the WorkQueue class members (Hennadii Stepanov)
Pull request description:
Noted while reviewing #19033, and hoping this will not conflict with it :)
ACKs for top commit:
promag:
Code review ACK 34b04eec4448bd37a8dbf560e4d99c7e7ca7e9c0.
Tree-SHA512: 4c15729acd95223263c19bc0dd64b9e7960872b48edee6eee97a5d0c2b99b8838185ac3a2ccd5bee992cb3a12498633427fe9919be5a12da9949fcf69a6275a0
Diffstat (limited to 'src')
-rw-r--r-- | src/httpserver.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 12395f5b24..45c049c3be 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -63,12 +63,11 @@ template <typename WorkItem> class WorkQueue { private: - /** Mutex protects entire object */ Mutex cs; - std::condition_variable cond; - std::deque<std::unique_ptr<WorkItem>> queue; - bool running; - size_t maxDepth; + std::condition_variable cond GUARDED_BY(cs); + std::deque<std::unique_ptr<WorkItem>> queue GUARDED_BY(cs); + bool running GUARDED_BY(cs); + const size_t maxDepth; public: explicit WorkQueue(size_t _maxDepth) : running(true), |