[+] Sketchy pump system io events in ::Main of async apps
This commit is contained in:
parent
5676ef84fb
commit
18c435a433
@ -45,9 +45,11 @@ namespace Aurora::Async
|
|||||||
|
|
||||||
static void SchedThread()
|
static void SchedThread()
|
||||||
{
|
{
|
||||||
auto thread = Threading::Threads::GetThread();
|
AuUInt32 counter {};
|
||||||
AuList<SchedEntry> pending;
|
AuList<SchedEntry> pending;
|
||||||
|
|
||||||
|
auto thread = Threading::Threads::GetThread();
|
||||||
|
|
||||||
while (!thread->Exiting())
|
while (!thread->Exiting())
|
||||||
{
|
{
|
||||||
Threading::SleepNs(1000000 / 2);
|
Threading::SleepNs(1000000 / 2);
|
||||||
@ -60,6 +62,13 @@ namespace Aurora::Async
|
|||||||
static_cast<AsyncApp *>(GetAsyncApp())->Run(entry.target, entry.runnable);
|
static_cast<AsyncApp *>(GetAsyncApp())->Run(entry.target, entry.runnable);
|
||||||
DecRunningTasks();
|
DecRunningTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
counter++;
|
||||||
|
if ((counter % 4) == 0)
|
||||||
|
{
|
||||||
|
// TODO: noting this should be called from main; however, we only pump console for.now
|
||||||
|
RuntimeSysPump();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user