mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
Fix missing lock mutex in main OD loop (!)
This will fix the OD bug where some tasks never start on faster computers that caused the race condition.
This commit is contained in:
@@ -271,6 +271,7 @@ void ODManager::Start()
|
||||
mCurrentThreads++;
|
||||
mCurrentThreadsMutex.Unlock();
|
||||
|
||||
mTasksMutex.Lock();
|
||||
//detach a new thread.
|
||||
thread = new ODTaskThread(mTasks[0]);//task);
|
||||
//thread->SetPriority(10);//default is 50.
|
||||
@@ -279,7 +280,6 @@ void ODManager::Start()
|
||||
|
||||
mTasks.erase(mTasks.begin());
|
||||
tasksInArray = mTasks.size()>0;
|
||||
|
||||
mTasksMutex.Unlock();
|
||||
|
||||
mCurrentThreadsMutex.Lock();
|
||||
@@ -324,7 +324,6 @@ void ODManager::Start()
|
||||
|
||||
//wxLogDebug Not thread safe.
|
||||
//printf("ODManager thread terminating\n");
|
||||
|
||||
}
|
||||
|
||||
//static function that prevents ODTasks from being scheduled
|
||||
|
Reference in New Issue
Block a user