Thank you for the clarification. I have now read the original explanation, and it makes sense. Ultimately, I think the sit-for is the right approach for my wait-for-any-process-or-input problem. Am I right to assume it's not affected by your explanation, and that I can expect immediate return there? If so, there's some unfortunate combination of factors that cause a hard-to-reproduce hang in Emacs, at least in the packages where I use it. But that's a matter for a future issue... Thanks, João On Mon, Oct 8, 2018, 21:25 Eli Zaretskii wrote: > > From: João Távora > > Date: Mon, 8 Oct 2018 21:06:12 +0100 > > Cc: 32986@debbugs.gnu.org > > > > I will fully read and process your thorough reply later tonight or > tomorrow, but in the meantime let me just > > restate, or clarify in case it wasn't clear, that I expect the 30s, 15s > and 0.1s case to break equally as quickly, > > namely as quick as I can type the first input. > > > > And indeed that's what happens on Linux and Mac OSX, but not on > Windows. If your reply already addresses > > this apparent discrepancy, then I apologize for my premature > clarification in advance. > > I didn't investigate the difference in behavior between Windows and > GNU/Linux, because I see similar behavior on both systems if I > neutralize all the "contaminating" factors which I described. It is > possible that it's easier to get the 30-sec delay on Windows because > keyboard input works without signals there, and uses messaging between > 2 threads running within the Emacs process. > > In any case, my point is that your expectation for immediate return is > incorrect, and I tried to explain why. >