[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sleep-for documentation and how to pause reliably
From: |
Stefan Monnier |
Subject: |
Re: sleep-for documentation and how to pause reliably |
Date: |
Fri, 15 Feb 2013 15:36:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
>> > 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.
I think it should indeed do it in a loop.
> 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.
This doesn't say that it will interrupt sleep-for, only that process
filters will be run during sleep-for.
Stefan
- sleep-for documentation and how to pause reliably, Eli Zaretskii, 2013/02/15
- Re: sleep-for documentation and how to pause reliably, Thierry Volpiatto, 2013/02/15
- Re: sleep-for documentation and how to pause reliably, Eli Zaretskii, 2013/02/15
- Re: sleep-for documentation and how to pause reliably, Thierry Volpiatto, 2013/02/15
- Re: sleep-for documentation and how to pause reliably, Eli Zaretskii, 2013/02/16
- Re: sleep-for documentation and how to pause reliably, Xue Fuqiao, 2013/02/17
- Re: sleep-for documentation and how to pause reliably, Eli Zaretskii, 2013/02/17
- Re: sleep-for documentation and how to pause reliably, Xue Fuqiao, 2013/02/17
Re: sleep-for documentation and how to pause reliably, Stefan Monnier, 2013/02/15