output/httpd: wake up the I/O thread only if pages have been read from encoder
This commit is contained in:
parent
72008d951b
commit
452666f742
|
@ -343,12 +343,16 @@ HttpdOutput::BroadcastFromEncoder()
|
|||
cond.wait(mutex);
|
||||
}
|
||||
|
||||
bool empty = true;
|
||||
|
||||
PagePtr page;
|
||||
while ((page = ReadPage()) != nullptr) {
|
||||
const std::lock_guard<Mutex> lock(mutex);
|
||||
pages.push(std::move(page));
|
||||
empty = false;
|
||||
}
|
||||
|
||||
if (!empty)
|
||||
DeferredMonitor::Schedule();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue