Another possible fix for deadlock

This commit is contained in:
Lion Kortlepel 2021-11-29 03:07:20 +01:00
parent 98c7fea139
commit eb67f483b2
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -64,8 +64,9 @@ void TLuaEngine::operator()() {
if (Waited > 250) {
// FIXME: This should *eventually* timeout.
// beammp_lua_error(Res->Function + " in " + Res->StateId + " took >1s to respond, not printing possible errors");
std::unique_lock Lock(mResultsToCheckMutex);
Lock.lock();
mResultsToCheck.push(Res);
Lock.unlock();
break;
}
}