From 72fd8d018ec6f6240960c897a31b003d612560cd Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Mon, 23 Oct 2023 10:21:31 +0100 Subject: [PATCH] [*] a7af61e9 cont: Potential Win32 loop queue bug fixes/improvements --- Source/IO/Loop/LoopQueue.NT.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/IO/Loop/LoopQueue.NT.cpp b/Source/IO/Loop/LoopQueue.NT.cpp index dadd917d..ce71240d 100644 --- a/Source/IO/Loop/LoopQueue.NT.cpp +++ b/Source/IO/Loop/LoopQueue.NT.cpp @@ -665,8 +665,6 @@ namespace Aurora::IO::Loop { if (endTime <= startTime) { - StartUserAndTakeOwn(); - Iterator queueIterator(this); for (queueIterator.Start(); queueIterator.End() != queueIterator.itr; ) { @@ -682,6 +680,11 @@ namespace Aurora::IO::Loop queueIterator.Next(); } + if (!StartUserAndTakeOwn()) + { + return false; + } + ConsiderEvicitingTimeoutsAll(); StartUserAndTakeOwn_Release(); bFinished = true; @@ -1123,7 +1126,11 @@ namespace Aurora::IO::Loop } else if (!status) { - StartUserAndTakeOwn(); + if (!StartUserAndTakeOwn()) + { + return false; + } + ConsiderEvicitingTimeoutsAll(); bFinished = true; StartUserAndTakeOwn_Release();