summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
461c9b8)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14917
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) )
+ // although the thread might be already in the EXITED state it might not
+ // have terminated yet and so we are not sure that it has actually
+ // terminated if the "if" above hadn't been taken
+ do
- wxLogLastError(wxT("GetExitCodeThread"));
+ if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) )
+ {
+ wxLogLastError(wxT("GetExitCodeThread"));
+ rc = (ExitCode)-1;
+ }
+ } while ( (DWORD)rc == STILL_ACTIVE );
- wxASSERT_MSG( (DWORD)rc != STILL_ACTIVE,
- wxT("thread must be already terminated.") );
-