Browse Source

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.
0.14
Matt Corallo 8 years ago
parent
commit
7b2d96b634
  1. 2
      src/httpserver.cpp

2
src/httpserver.cpp

@ -118,7 +118,7 @@ public: @@ -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…
Cancel
Save