mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 03:01:09 +02:00
Access WorkQueue::running only within the cs lock.
This removes a "race" between Interrupt() and Run(), though it should not effect any of our supported platforms.
This commit is contained in:
@ -118,7 +118,7 @@ public:
|
||||
void Run()
|
||||
{
|
||||
ThreadCounter count(*this);
|
||||
while (running) {
|
||||
while (true) {
|
||||
std::unique_ptr<WorkItem> i;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(cs);
|
||||
|
Reference in New Issue
Block a user