output/Control: add LockWaitForCommand()
This commit is contained in:
parent
684bd9153e
commit
2c8d004f78
@ -309,6 +309,11 @@ public:
|
||||
*/
|
||||
void WaitForCommand() noexcept;
|
||||
|
||||
void LockWaitForCommand() noexcept {
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
WaitForCommand();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a command, but does not wait for completion.
|
||||
*
|
||||
|
@ -158,10 +158,8 @@ MultipleOutputs::EnableDisable()
|
||||
void
|
||||
MultipleOutputs::WaitAll() noexcept
|
||||
{
|
||||
for (const auto &ao : outputs) {
|
||||
const std::lock_guard<Mutex> protect(ao->mutex);
|
||||
ao->WaitForCommand();
|
||||
}
|
||||
for (const auto &ao : outputs)
|
||||
ao->LockWaitForCommand();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user