mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 18:47:32 -05:00
Add a general way to request an immediate top-level callback.
This is a little like schedule_timer, in that the callback you provide will be run from the top-level message loop of whatever application you're in; but unlike the timer mechanism, it will happen _immediately_. The aim is to provide a general way to avoid re-entrance of code, in cases where just _doing_ the thing you want done is liable to trigger a confusing recursive call to the function in which you came to the decision to do it; instead, you just request a top-level callback at the message loop's earliest convenience, and do it then. [originally from svn r10019]
This commit is contained in:
@ -585,6 +585,8 @@ int do_eventsel_loop(HANDLE other_event)
|
||||
|
||||
sfree(handles);
|
||||
|
||||
run_toplevel_callbacks();
|
||||
|
||||
if (n == WAIT_TIMEOUT) {
|
||||
now = next;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user