mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01: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:
parent
1c2edd9f67
commit
7b2d96b634
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user