output/Internal: add method IsBusy()
This commit is contained in:
parent
2e4e1c7f48
commit
c788c76dc9
|
@ -313,6 +313,13 @@ public:
|
|||
return command == Command::NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Caller must lock the mutex.
|
||||
*/
|
||||
bool IsBusy() const {
|
||||
return IsOpen() && !IsCommandFinished();
|
||||
}
|
||||
|
||||
/**
|
||||
* Caller must lock the mutex.
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue