Commit 9f022ec0 authored by Davis King's avatar Davis King

Fixed a problem that caused the python interpreter to hang on program exit when

the dlib GUI was used.
parent 7a426a5a
......@@ -182,11 +182,17 @@ namespace dlib
{
if (PostMessage(helper_window,WM_USER+QUIT_EVENT_HANDLER_THREAD,0,0)==0)
{
dlog << LERROR << "Unable to schedule function for execution in event handling thread.";
dlog << LWARN << "Unable to schedule function for execution in event handling thread.";
// No point calling wait() here since the thread isn't going to
// terminate gracefully in this case. So we just let the program
// end as it will and hope for the best.
}
else
{
// wait for the event handler thread to terminate.
wait();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment