From: Eli Zaretskii <eliz@gnu.org>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: sleep-for documentation and how to pause reliably
Date: Fri, 15 Feb 2013 15:18:53 +0200 [thread overview]
Message-ID: <83haldu342.fsf@gnu.org> (raw)
In-Reply-To: <878v6pj2vk.fsf@gmail.com>
> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
> Date: Fri, 15 Feb 2013 11:19:27 +0100
>
> > Am I missing something? If not, apart of fixing the docs, _is_ there
> > any way to wait reliably when async subprocesses are running and
> > producing output?
> What about using a sentinel?
>
> (progn
> (let ((proc (start-process-shell-command "ls" nil "ls")))
> (set-process-sentinel proc #'(lambda (process event)
> (when (string= event "finished\n"))
> (sleep-for 20)
> (message "hi after 20s sleeping"))))
> (message "Hi now sleeping 20s"))
Thanks, but that's not what I meant. I meant, suppose you must
reliably wait in a Lisp program that doesn't launch any subprocesses,
but should always wait for N seconds even if there are some async
subprocesses running in parallel. IOW, the code that must pause
doesn't itself launch any subprocesses, it just needs to wait.
next prev parent reply other threads:[~2013-02-15 13:18 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83haldu342.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=thierry.volpiatto@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.