emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sleep-for documentation and how to pause reliably


From: Eli Zaretskii
Subject: Re: sleep-for documentation and how to pause reliably
Date: Fri, 15 Feb 2013 20:24:22 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Fri, 15 Feb 2013 11:11:43 -0500
> 
> > However, in fact, sleep-for will return as soon as any input from any
> > subprocess arrives.
> 
> That'd be a bug.

The implementation calls wait_reading_process_output, so I don't see
how it can behave otherwise, unless it calls that function in a loop
until the time passes.

Also, in the meantime I found this in the ELisp manual:

     Output from a subprocess can arrive only while Emacs is waiting: when
  reading terminal input (see the function `waiting-for-user-input-p'),
  in `sit-for' and `sleep-for' (*note Waiting::), and in
  `accept-process-output' (*note Accepting Output::).  This minimizes the
  problem of timing errors that usually plague parallel programming.

So this actually sounds like a deliberate feature.

That said, I don't mind filing a bug report, if you think this should
be fixed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]