mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Access WorkQueue::running only within the cs lock. (#1460)
This removes a race between Interrupt() and Run()
This commit is contained in:
parent
e30faab6fd
commit
c4fe229008
@ -126,7 +126,7 @@ public:
|
||||
void Run()
|
||||
{
|
||||
ThreadCounter count(*this);
|
||||
while (running) {
|
||||
while (true) {
|
||||
WorkItem* i = 0;
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(cs);
|
||||
|
Loading…
Reference in New Issue
Block a user