exit: only wait for completion if a handler was set
This commit is contained in:
parent
9386ed6d9f
commit
36b4657631
@ -184,12 +184,12 @@ LRESULT CALLBACK MainWndProc(HWND hwnd , UINT msg , WPARAM wParam,
|
|||||||
{
|
{
|
||||||
if (l_sigcleanup) {
|
if (l_sigcleanup) {
|
||||||
l_sigcleanup(SIGINT);
|
l_sigcleanup(SIGINT);
|
||||||
|
LOGDEB("MainWndProc: got end message, waiting for work finished\n");
|
||||||
|
DWORD res = WaitForSingleObject(eWorkFinished, INFINITE);
|
||||||
|
if (res != WAIT_OBJECT_0) {
|
||||||
|
LOGERR("MainWndProc: exit ack wait failed\n" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LOGDEB("MainWndProc: got end message, waiting for work finished\n" );
|
|
||||||
DWORD res = WaitForSingleObject(eWorkFinished, INFINITE);
|
|
||||||
if (res != WAIT_OBJECT_0) {
|
|
||||||
LOGERR("MainWndProc: exit ack wait failed\n" );
|
|
||||||
}
|
|
||||||
LOGDEB("MainWindowProc: got exit ready event, exiting\n" );
|
LOGDEB("MainWindowProc: got exit ready event, exiting\n" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user