mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Increase threadsafety annotation coverage
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
||||
{
|
||||
}
|
||||
/** Enqueue a work item */
|
||||
bool Enqueue(WorkItem* item)
|
||||
bool Enqueue(WorkItem* item) EXCLUSIVE_LOCKS_REQUIRED(!cs)
|
||||
{
|
||||
LOCK(cs);
|
||||
if (!running || queue.size() >= maxDepth) {
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
/** Thread function */
|
||||
void Run()
|
||||
void Run() EXCLUSIVE_LOCKS_REQUIRED(!cs)
|
||||
{
|
||||
while (true) {
|
||||
std::unique_ptr<WorkItem> i;
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
}
|
||||
}
|
||||
/** Interrupt and exit loops */
|
||||
void Interrupt()
|
||||
void Interrupt() EXCLUSIVE_LOCKS_REQUIRED(!cs)
|
||||
{
|
||||
LOCK(cs);
|
||||
running = false;
|
||||
|
||||
Reference in New Issue
Block a user