[*] +1 out of at least 2 more WaitAll issues solved

[*] Bug fix LSTimer
This commit is contained in:
Reece Wilson 2022-04-19 02:52:11 +01:00
parent 2005b1d0e1
commit ec5516c751
2 changed files with 8 additions and 2 deletions

View File

@ -85,7 +85,7 @@ namespace Aurora::Loop
return true; return true;
} }
bool ok = AuAtomicAdd<AuUInt32>(&this->count_, 1) < this->maxIterationsOrZero_; bool ok = AuAtomicAdd<AuUInt32>(&this->count_, 1) <= this->maxIterationsOrZero_;
if (ok) if (ok)
{ {
this->UpdateTimeInternal(this->targetTime_ + (AuUInt64(this->reschedStepMsOrZero_) * 10'000ULL)); this->UpdateTimeInternal(this->targetTime_ + (AuUInt64(this->reschedStepMsOrZero_) * 10'000ULL));

View File

@ -571,7 +571,7 @@ namespace Aurora::Loop
{ {
AU_LOCK_GUARD(this->rwMutex_->AsReadable()); AU_LOCK_GUARD(this->rwMutex_->AsReadable());
bool bReturnStatus {true}; bool bReturnStatus {false};
bool bTimeout {false}; bool bTimeout {false};
AuUInt32 count {}; AuUInt32 count {};
AuUInt32 index {}; AuUInt32 index {};
@ -672,8 +672,14 @@ namespace Aurora::Loop
source.source->OnFinishSleep(); source.source->OnFinishSleep();
if (ticked)
{
bReturnStatus |= true;
}
if (bShouldRemove) if (bShouldRemove)
{ {
if (source.source->GetType() == ELoopSource::eSourceWin32) if (source.source->GetType() == ELoopSource::eSourceWin32)
{ {
SysPanic("?"); SysPanic("?");