Enhance logging and task management; enable trace facility, add scheduler state logging, and improve shutdown handling
This commit is contained in:
@@ -145,10 +145,14 @@ internal static class Program
|
||||
Console.WriteLine("[Sim] Requesting core shutdown...");
|
||||
if (Nova64Core.nova64_shutdown())
|
||||
{
|
||||
if (!_coreThread.Join(TimeSpan.FromSeconds(5)))
|
||||
int timeoutMs = 1000;
|
||||
while (!Nova64Core.nova64_is_finalized() && timeoutMs > 0)
|
||||
{
|
||||
Console.WriteLine("[Sim] Core thread did not exit in time.");
|
||||
Thread.Sleep(10);
|
||||
timeoutMs -= 10;
|
||||
}
|
||||
Console.WriteLine($"[Sim] Core shutdown complete after {1000 - timeoutMs}ms.");
|
||||
_coreThread = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user