Don't eat CPU while shutting down the GT server.

This commit is contained in:
Greg Edwards 2014-07-14 19:18:18 -04:00
parent 9fc5459c66
commit 0f97b73504

View File

@ -102,7 +102,10 @@ namespace PkmnFoundations.GlobalTerminalService
m_listener.Stop();
m_closing = true;
// wait for worker threads to exit
while (m_workers.Count > 0) { }
while (m_workers.Count > 0)
{
Thread.Sleep(10);
}
}
}