]> git.saurik.com Git - wxWidgets.git/commit - src/common/evtloopcmn.cpp
Don't block in wxEventLoopManual::Dispatch() if loop was exited.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Apr 2012 22:24:54 +0000 (22:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Apr 2012 22:24:54 +0000 (22:24 +0000)
commit586c455167ef67ac2920db45e48f8509b8be8d31
treed29eaffecd9a1e52ce60fba5b4aefcd145d7bf95
parenta6a181a303aeebb013d5237bfc8dd8b3b12aea50
Don't block in wxEventLoopManual::Dispatch() if loop was exited.

If Exit() was called from a handler for one of the pending events we could
reenter Dispatch() and block there indefinitely if no other events were coming
and this was exactly what happened in wxFileSystemWatcher unit test,
preventing it from ever running to completion under Unix.

Fix this by checking m_shouldExit after executing the pending handlers and
before calling Dispatch().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/evtloopcmn.cpp