Fix the VST thread synchronization on activate/deactivate
This commit is contained in:
parent
fbac436cc0
commit
174d58fd87
1 changed files with 6 additions and 1 deletions
|
|
@ -740,8 +740,13 @@ void SfizzVstProcessor::doBackgroundWork()
|
||||||
for (;;) {
|
for (;;) {
|
||||||
bool isNotified = _semaToWorker.timed_wait(kBackgroundIdleInterval.count());
|
bool isNotified = _semaToWorker.timed_wait(kBackgroundIdleInterval.count());
|
||||||
|
|
||||||
if (!_workRunning)
|
if (!_workRunning) {
|
||||||
|
// if the quit signal is sent, the semaphore is also signaled
|
||||||
|
// make sure the count is kept consistent
|
||||||
|
if (!isNotified)
|
||||||
|
_semaToWorker.wait();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
const char* id = nullptr;
|
const char* id = nullptr;
|
||||||
RTMessagePtr msg;
|
RTMessagePtr msg;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue