From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: sleep-for documentation and how to pause reliably
Date: Fri, 15 Feb 2013 15:36:31 -0500 [thread overview]
Message-ID: <jwv4nhd2u4m.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83zjz5saeh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Feb 2013 20:24:22 +0200")
>> > 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
next prev parent reply other threads:[~2013-02-15 20:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 9:22 sleep-for documentation and how to pause reliably Eli Zaretskii
2013-02-15 10:19 ` Thierry Volpiatto
2013-02-15 13:18 ` Eli Zaretskii
2013-02-15 20:36 ` Thierry Volpiatto
2013-02-16 8:40 ` Eli Zaretskii
2013-02-17 11:58 ` Xue Fuqiao
2013-02-17 16:26 ` Eli Zaretskii
2013-02-17 23:41 ` Xue Fuqiao
2013-02-15 16:11 ` Stefan Monnier
2013-02-15 18:24 ` Eli Zaretskii
2013-02-15 20:36 ` Stefan Monnier [this message]
2013-03-02 20:48 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4nhd2u4m.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).