Skip to content

Commit d2f6d29

Browse files
author
MarcoFalke
committed
Merge bitcoin#21895: refactor: Add TSA annotations to the WorkQueue class members
34b04ee refactor: Add TSA annotations to the WorkQueue class members (Hennadii Stepanov) Pull request description: Noted while reviewing bitcoin#19033, and hoping this will not conflict with it :) ACKs for top commit: promag: Code review ACK 34b04ee. Tree-SHA512: 4c15729acd95223263c19bc0dd64b9e7960872b48edee6eee97a5d0c2b99b8838185ac3a2ccd5bee992cb3a12498633427fe9919be5a12da9949fcf69a6275a0
2 parents 4a26705 + 34b04ee commit d2f6d29

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/httpserver.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ template <typename WorkItem>
6363
class WorkQueue
6464
{
6565
private:
66-
/** Mutex protects entire object */
6766
Mutex cs;
68-
std::condition_variable cond;
69-
std::deque<std::unique_ptr<WorkItem>> queue;
70-
bool running;
71-
size_t maxDepth;
67+
std::condition_variable cond GUARDED_BY(cs);
68+
std::deque<std::unique_ptr<WorkItem>> queue GUARDED_BY(cs);
69+
bool running GUARDED_BY(cs);
70+
const size_t maxDepth;
7271

7372
public:
7473
explicit WorkQueue(size_t _maxDepth) : running(true),

0 commit comments

Comments
 (0)