output/MultipleOutputs: reduce lock/unlock calls in EnableDisable()

Use ScopeLock to manage the lock; don't unlock after obtaining the
"really_enabled" flag; keep the same lock during EnableWait() /
DisableWait().
This commit is contained in:
Max Kellermann
2016-12-14 07:54:05 +01:00
parent a9d7293818
commit ced3f320eb
3 changed files with 19 additions and 15 deletions

View File

@@ -323,13 +323,17 @@ public:
/**
* Enables the device.
*
* Caller must lock the mutex.
*/
void LockEnableWait();
void EnableWait();
/**
* Disables the device.
*
* Caller must lock the mutex.
*/
void LockDisableWait();
void DisableWait();
void LockPauseAsync();