[*] Found another race condition

This commit is contained in:
Reece Wilson 2023-02-11 19:37:30 +00:00
parent ba9ddded75
commit 9d71b5c04f

View File

@ -1103,17 +1103,17 @@ namespace Aurora::Threading::Threads
HookReleaseThreadResources();
if (this->terminated_)
{
this->exitOnlyOnce_->Unlock();
this->terminated_->Set();
}
if (this->terminatedSignalLs_)
{
this->terminatedSignalLs_->Set();
}
if (this->terminated_)
{
this->exitOnlyOnce_->Unlock();
this->terminated_->Set(); // must be set last, after which point we cannot use this!
}
return true;
}