mirror of
https://github.com/clangen/musikcube.git
synced 2025-04-16 05:42:54 +00:00
Fixed a deadlock in LocalLibrary
This commit is contained in:
parent
aa64784128
commit
969934fb16
@ -199,13 +199,12 @@ void LocalLibrary::ThreadProc() {
|
||||
LocalQueryPtr query;
|
||||
|
||||
while (true) {
|
||||
std::unique_lock<std::mutex> lock(this->mutex);
|
||||
|
||||
if ((query = GetNextQuery())) {
|
||||
this->RunQuery(query);
|
||||
}
|
||||
|
||||
if (!this->queryQueue.size() && !this->Exited()) {
|
||||
std::unique_lock<std::mutex> lock(this->mutex);
|
||||
this->queueCondition.wait(lock);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user