changed DoMessageFromThreadWait() to not block if there are no messages, this avoids the need for sending a dummy WM_NULL from the thread wait loop (replaces patch 1459812)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-04-08 22:51:42 +00:00
parent 284ee6c3da
commit 031943ac4c
2 changed files with 9 additions and 9 deletions

View File

@@ -737,12 +737,6 @@ wxThreadInternal::WaitForTerminate(wxCriticalSection& cs,
// the system might dead lock then
if ( wxThread::IsMain() )
{
// it looks that sometimes WAIT_OBJECT_0 + 1 is
// returned but there are no messages in the thread
// queue -- prevent DoMessageFromThreadWait() from
// blocking inside ::GetMessage() forever in this case
::PostMessage(NULL, WM_NULL, 0, 0);
wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits()
: NULL;