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
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue