Fix waiting for threads in MSW in presence of events
We need to handle WAIT_OBJECT_0+2 value which can be returned by
WaitForThread() since 6c40531fb7
as it now waits
for two objects and not just one, failure to do this resulted in an endless
stream of asserts if any Windows messages were pending when we started waiting
for the thread.
This commit is contained in:
parent
3e75b231b0
commit
6af5329710
@ -800,9 +800,10 @@ wxThreadInternal::WaitForTerminate(wxCriticalSection& cs,
|
||||
break;
|
||||
|
||||
case WAIT_OBJECT_0 + 1:
|
||||
// new message arrived, process it -- but only if we're the
|
||||
// main thread as we don't support processing messages in
|
||||
// the other ones
|
||||
case WAIT_OBJECT_0 + 2:
|
||||
// Wake up has been signaled or a new message arrived, process
|
||||
// it -- but only if we're the main thread as we don't support
|
||||
// processing messages in the other ones
|
||||
//
|
||||
// NB: we still must include QS_ALLINPUT even when waiting
|
||||
// in a secondary thread because if it had created some
|
||||
|
Loading…
Reference in New Issue
Block a user