Skip to content

Commit 7b2d96b

Browse files
committed
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.
1 parent 1c2edd9 commit 7b2d96b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/httpserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class WorkQueue
118118
void Run()
119119
{
120120
ThreadCounter count(*this);
121-
while (running) {
121+
while (true) {
122122
std::unique_ptr<WorkItem> i;
123123
{
124124
std::unique_lock<std::mutex> lock(cs);

0 commit comments

Comments
 (0)