Skip to content

Commit

Permalink
Merge bitcoin#21895: refactor: Add TSA annotations to the WorkQueue c…
Browse files Browse the repository at this point in the history
…lass 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
  • Loading branch information
MarcoFalke committed May 11, 2021
2 parents 4a26705 + 34b04ee commit d2f6d29
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit d2f6d29

Please sign in to comment.