Commit 72008d95 authored by Max Kellermann's avatar Max Kellermann

output/httpd: no mutex lock while reading data from encoder

parent 72146e78
......@@ -341,10 +341,12 @@ HttpdOutput::BroadcastFromEncoder()
const std::lock_guard<Mutex> lock(mutex);
while (!pages.empty())
cond.wait(mutex);
}
PagePtr page;
while ((page = ReadPage()) != nullptr)
pages.push(page);
PagePtr page;
while ((page = ReadPage()) != nullptr) {
const std::lock_guard<Mutex> lock(mutex);
pages.push(std::move(page));
}
DeferredMonitor::Schedule();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment