mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 12:42:05 +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()
|
void Run()
|
||||||
{
|
{
|
||||||
ThreadCounter count(*this);
|
ThreadCounter count(*this);
|
||||||
while (running) {
|
while (true) {
|
||||||
std::unique_ptr<WorkItem> i;
|
std::unique_ptr<WorkItem> i;
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(cs);
|
std::unique_lock<std::mutex> lock(cs);
|
||||||
|
Reference in New Issue
Block a user