Commit c788c76d authored by Max Kellermann's avatar Max Kellermann

output/Internal: add method IsBusy()

parent 2e4e1c7f
......@@ -316,6 +316,13 @@ public:
/**
* Caller must lock the mutex.
*/
bool IsBusy() const {
return IsOpen() && !IsCommandFinished();
}
/**
* Caller must lock the mutex.
*/
const std::exception_ptr &GetLastError() const {
return last_error;
}
......
......@@ -138,7 +138,7 @@ MultipleOutputs::AllFinished() const
{
for (auto ao : outputs) {
const std::lock_guard<Mutex> protect(ao->mutex);
if (ao->IsOpen() && !ao->IsCommandFinished())
if (ao->IsBusy())
return false;
}
......
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