[*] Potential Win32 loop queue bug fixes/improvements

This commit is contained in:
Reece Wilson 2023-10-22 22:11:24 +01:00
parent 6d49de430a
commit a7af61e9bf

View File

@ -666,7 +666,6 @@ namespace Aurora::IO::Loop
if (endTime <= startTime)
{
StartUserAndTakeOwn();
ConsiderEvicitingTimeoutsAll();
Iterator queueIterator(this);
for (queueIterator.Start(); queueIterator.End() != queueIterator.itr; )
@ -683,6 +682,7 @@ namespace Aurora::IO::Loop
queueIterator.Next();
}
ConsiderEvicitingTimeoutsAll();
StartUserAndTakeOwn_Release();
bFinished = true;
return false;
@ -1456,7 +1456,6 @@ namespace Aurora::IO::Loop
auto now = AuTime::SteadyClockMS();
for (queueIterator.Start(); queueIterator.End() != queueIterator.itr; )
{
auto &source = *queueIterator.itr;
if (!source.ConsiderTimeout(now))
{
@ -1464,6 +1463,8 @@ namespace Aurora::IO::Loop
continue;
}
source.source->OnFinishSleep();
if (source.source->GetType() == ELoopSource::eSourceWin32)
{
// Null message loop hack
@ -1487,7 +1488,7 @@ namespace Aurora::IO::Loop
}
queueIterator.Delete(this->loopSourceExs_.erase(queueIterator.itr));
break;
continue;
}
queueIterator.Next();