[*] fix posix cont (crit) 3c19c7a5
This commit is contained in:
parent
3db7f527f4
commit
4e0c68d7ad
@ -183,6 +183,12 @@ namespace Aurora::Threading::Primitives
|
||||
while (!this->TryLock())
|
||||
{
|
||||
AU_LOCK_GUARD(this->mutex_);
|
||||
|
||||
if (this->TryLock())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
(void)this->cond_.WaitForSignalNsEx(&this->mutex_, 0, true);
|
||||
}
|
||||
|
||||
@ -197,6 +203,12 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
{
|
||||
AU_LOCK_GUARD(this->mutex_);
|
||||
|
||||
if (this->TryLock())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
(void)this->cond_.WaitForSignalNsEx(&this->mutex_, uTimeout, true);
|
||||
}
|
||||
|
||||
@ -222,11 +234,11 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
if (count > 1)
|
||||
{
|
||||
this->cond_.Signal();
|
||||
this->cond_.Broadcast();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->cond_.Broadcast();
|
||||
this->cond_.Signal();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user