[*] im not sure why this was written like this

This commit is contained in:
Reece Wilson 2023-06-23 22:36:13 +01:00
parent 0d05fd3d33
commit fa90463a73

View File

@ -317,13 +317,15 @@ namespace Aurora::Threading::Primitives
}
AuInt32 val {};
bool bElevation {};
{
AU_LOCK_GUARD(this->mutex_);
val = AuAtomicSub(&this->state_, 1);
bElevation = this->bElevaterPending_;
}
if ((val == 1) && (this->bElevaterPending_))
if ((val == 0) && (bElevation))
{
this->GetConditionWriter().Signal();
}