aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-09 13:48:07 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-09 13:48:07 +0300
commit34b04eec4448bd37a8dbf560e4d99c7e7ca7e9c0 (patch)
tree4653aba485db223ea2a61a3211a8a5d854e0635a /src
parent5925f1e652768a9502831b9ccf78d16cf3c37d29 (diff)
refactor: Add TSA annotations to the WorkQueue class members
Diffstat (limited to 'src')
-rw-r--r--src/httpserver.cpp9
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),