#3488 Prelock mutexes

Main thread has priority, it shouldn't be relocking on each loadMeshLOD
master
Andrey Kleshchev 2025-03-19 17:57:50 +02:00 committed by Andrey Kleshchev
parent b39e281767
commit b6bf32e00e
1 changed files with 2 additions and 0 deletions

View File

@ -4573,6 +4573,8 @@ void LLMeshRepository::notifyLoadedMeshes()
std::partial_sort(mPendingRequests.begin(), mPendingRequests.begin() + push_count,
mPendingRequests.end(), PendingRequestBase::CompareScoreGreater());
}
LLMutexTrylock lock3(mThread->mHeaderMutex);
LLMutexTrylock lock4(mThread->mPendingMutex);
while (!mPendingRequests.empty() && push_count > 0)
{
std::unique_ptr<PendingRequestBase>& req_p = mPendingRequests.front();