In response to Chrisw67, the thread checks this flag right after the gui thread releases a lock, so the destructor actually looks like this:
MainWindow::~MainWindow()
{
fprintf(dfp,"\n\n=================EXITING APPLICATION====================\n\n");
app_trying_to_exit = true;
sysmutex.unlock();
delete ui;
}
Note I don't see the output from fprintf in my log file.
In response to Wysota, I will look into non thread pool threads. Note the thread waits on a lock for 99% of the time, so maybe starving the app this isn't a problem.




Reply With Quote


Bookmarks