[+] Sketchy pump system io events in ::Main of async apps

This commit is contained in:
Reece Wilson 2021-07-01 14:49:32 +01:00
parent 5676ef84fb
commit 18c435a433

View File

@ -45,8 +45,10 @@ namespace Aurora::Async
static void SchedThread()
{
auto thread = Threading::Threads::GetThread();
AuUInt32 counter {};
AuList<SchedEntry> pending;
auto thread = Threading::Threads::GetThread();
while (!thread->Exiting())
{
@ -60,6 +62,13 @@ namespace Aurora::Async
static_cast<AsyncApp *>(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();
}
}
}