Allow recursive calls to wxEventLoop::Yield().
There doesn't seem to be any reason to forbid them and this change allows wxExecute() without wxEXEC_NOEVENTS to work without assertion failures when called from inside wxYield(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -224,7 +224,6 @@ public:
|
||||
user to perform actions which are not compatible with the current task.
|
||||
Disabling menu items or whole menus during processing can avoid unwanted
|
||||
reentrance of code: see ::wxSafeYield for a better function.
|
||||
You can avoid unwanted reentrancies also using IsYielding().
|
||||
|
||||
Note that Yield() will not flush the message logs. This is intentional as
|
||||
calling Yield() is usually done to quickly update the screen and popping up
|
||||
@@ -232,10 +231,9 @@ public:
|
||||
messages immediately (otherwise it will be done during the next idle loop
|
||||
iteration), call wxLog::FlushActive.
|
||||
|
||||
Calling Yield() recursively is normally an error and an assert failure is
|
||||
raised in debug build if such situation is detected. However if the
|
||||
@a onlyIfNeeded parameter is @true, the method will just silently
|
||||
return @false instead.
|
||||
If @a onlyIfNeeded parameter is @true and the flow control is already
|
||||
inside Yield(), i.e. IsYielding() returns @true, the method just
|
||||
silently returns @false and doesn't do anything.
|
||||
*/
|
||||
bool Yield(bool onlyIfNeeded = false);
|
||||
|
||||
|
Reference in New Issue
Block a user