private async void WatchProcessAsync()
{
while (true)
{
await Game.Scene.GetComponent<TimerComponent>().WaitAsync(5000);
if (this.Id == 0)
{
return;
}
foreach (int appId in this.processes.Keys.ToArray())
{
Process process = this.processes[appId];
if (!process.HasExited)
{
continue;
}
this.processes.Remove(appId);
process.Dispose();
this.StartProcess(appId);
}
}
}
}