From 18c435a43380489c444af5940a29aa92cc86cc92 Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 1 Jul 2021 14:49:32 +0100 Subject: [PATCH] [+] Sketchy pump system io events in ::Main of async apps --- Source/Async/Schedular.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Async/Schedular.cpp b/Source/Async/Schedular.cpp index ac27687d..73d1016c 100644 --- a/Source/Async/Schedular.cpp +++ b/Source/Async/Schedular.cpp @@ -45,8 +45,10 @@ namespace Aurora::Async static void SchedThread() { - auto thread = Threading::Threads::GetThread(); + AuUInt32 counter {}; AuList pending; + + auto thread = Threading::Threads::GetThread(); while (!thread->Exiting()) { @@ -60,6 +62,13 @@ namespace Aurora::Async static_cast(GetAsyncApp())->Run(entry.target, entry.runnable); DecRunningTasks(); } + + counter++; + if ((counter % 4) == 0) + { + // TODO: noting this should be called from main; however, we only pump console for.now + RuntimeSysPump(); + } } }