From 09295e57f87020ac617d31cc250ff62b69716a7f Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Mon, 26 Jun 2023 08:11:45 +0100 Subject: [PATCH] [*] TODO: sort out async run modes --- Source/Async/ThreadPool.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Source/Async/ThreadPool.cpp b/Source/Async/ThreadPool.cpp index 1133f1dd..bd91798e 100644 --- a/Source/Async/ThreadPool.cpp +++ b/Source/Async/ThreadPool.cpp @@ -314,21 +314,18 @@ namespace Aurora::Async } } - if (bShouldTrySleepForKernel + if (bShouldTrySleepForKernel) + { // epoll and such like can be checked without read success. kevent works on availablity, not scheduling read like iosubmit // allow windows to atomically pump instead of wasting time buffering the primitives state - && ((AuBuild::kIsNtDerived && runMode == ERunMode::eEfficient) || + if ((AuBuild::kIsNtDerived && runMode == ERunMode::eEfficient) || (!AuBuild::kIsNtDerived)) - - && (asyncLoop->WaitAny(0)) - ) - { - success = PollInternal(false, uCount); - } - else - { - success |= PollInternal(false, uCount); + { + asyncLoop->WaitAny(0); + } } + + success = PollInternal(false, uCount); } else {