[*] a7af61e9 cont: Potential Win32 loop queue bug fixes/improvements

This commit is contained in:
Reece Wilson 2023-10-23 10:21:31 +01:00
parent 18dbe62959
commit 72fd8d018e

View File

@ -665,8 +665,6 @@ namespace Aurora::IO::Loop
{ {
if (endTime <= startTime) if (endTime <= startTime)
{ {
StartUserAndTakeOwn();
Iterator queueIterator(this); Iterator queueIterator(this);
for (queueIterator.Start(); queueIterator.End() != queueIterator.itr; ) for (queueIterator.Start(); queueIterator.End() != queueIterator.itr; )
{ {
@ -682,6 +680,11 @@ namespace Aurora::IO::Loop
queueIterator.Next(); queueIterator.Next();
} }
if (!StartUserAndTakeOwn())
{
return false;
}
ConsiderEvicitingTimeoutsAll(); ConsiderEvicitingTimeoutsAll();
StartUserAndTakeOwn_Release(); StartUserAndTakeOwn_Release();
bFinished = true; bFinished = true;
@ -1123,7 +1126,11 @@ namespace Aurora::IO::Loop
} }
else if (!status) else if (!status)
{ {
StartUserAndTakeOwn(); if (!StartUserAndTakeOwn())
{
return false;
}
ConsiderEvicitingTimeoutsAll(); ConsiderEvicitingTimeoutsAll();
bFinished = true; bFinished = true;
StartUserAndTakeOwn_Release(); StartUserAndTakeOwn_Release();