Add message on exit if some thread are still waiting

This commit is contained in:
Nekotekina 2020-02-26 20:45:32 +03:00
parent 5e59f18720
commit e102dc2a94
1 changed files with 3 additions and 2 deletions

View File

@ -1638,9 +1638,10 @@ void Emulator::Stop(bool restart)
cpu_thread::stop_all();
g_fxo->reset();
while (thread_ctrl::get_count())
while (u32 x = thread_ctrl::get_count())
{
std::this_thread::sleep_for(10ms);
sys_log.fatal("Waiting for %u threads...", x);
std::this_thread::sleep_for(300ms);
}
sys_log.notice("All threads have been stopped.");