* Waiting for Asynchronous Process
@ 2008-08-25 22:11 Eric
2008-08-25 22:20 ` David Kastrup
2008-08-27 18:39 ` Colin S. Miller
0 siblings, 2 replies; 4+ messages in thread
From: Eric @ 2008-08-25 22:11 UTC (permalink / raw)
To: help-gnu-emacs
Suppose I'm writing a function that will compile 4 files (A, B, C, and
D). The first three can compile in any order, but D must come last.
I want the user to have a responsive Emacs while the compilations are
going on.
I could do (call-process "theCompiler" .... "A")
(call-process "theCompiler" .... "B") ...
but then Emacs is "frozen" until all files are compiled.
I could do (start-process ...), but then I can't seem to wait for the
processes to all exit without causing Emacs to hang.
I know that ELisp doesn't do multithreading. Is it possible to do what
I want without creating a separate script outside of Emacs?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Waiting for Asynchronous Process
2008-08-25 22:11 Waiting for Asynchronous Process Eric
@ 2008-08-25 22:20 ` David Kastrup
2008-08-26 20:03 ` Eric
2008-08-27 18:39 ` Colin S. Miller
1 sibling, 1 reply; 4+ messages in thread
From: David Kastrup @ 2008-08-25 22:20 UTC (permalink / raw)
To: help-gnu-emacs
Eric <etklaus@gmail.com> writes:
> Suppose I'm writing a function that will compile 4 files (A, B, C, and
> D). The first three can compile in any order, but D must come last.
> I want the user to have a responsive Emacs while the compilations are
> going on.
>
> I could do (call-process "theCompiler" .... "A")
> (call-process "theCompiler" .... "B") ...
> but then Emacs is "frozen" until all files are compiled.
>
> I could do (start-process ...), but then I can't seem to wait for the
> processes to all exit without causing Emacs to hang.
>
> I know that ELisp doesn't do multithreading. Is it possible to do what
> I want without creating a separate script outside of Emacs?
(info "(elisp) Sentinels")
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Waiting for Asynchronous Process
2008-08-25 22:20 ` David Kastrup
@ 2008-08-26 20:03 ` Eric
0 siblings, 0 replies; 4+ messages in thread
From: Eric @ 2008-08-26 20:03 UTC (permalink / raw)
To: help-gnu-emacs
On Aug 25, 5:20 pm, David Kastrup <d...@gnu.org> wrote:
> Eric <etkl...@gmail.com> writes:
> > Suppose I'm writing a function that will compile 4 files (A, B, C, and
> > D). The first three can compile in any order, but D must come last.
> > I want the user to have a responsive Emacs while the compilations are
> > going on.
>
> > I could do (call-process "theCompiler" .... "A")
> > (call-process "theCompiler" .... "B") ...
> > but then Emacs is "frozen" until all files are compiled.
>
> > I could do (start-process ...), but then I can't seem to wait for the
> > processes to all exit without causing Emacs to hang.
>
> > I know that ELisp doesn't do multithreading. Is it possible to do what
> > I want without creating a separate script outside of Emacs?
>
> (info "(elisp) Sentinels")
>
> --
> David Kastrup, Kriemhildstr. 15, 44793 Bochum
That did it. All I needed to do was hit next once more in the manual
and I would have reached the chapter on Sentinels.
Thanks for the help!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Waiting for Asynchronous Process
2008-08-25 22:11 Waiting for Asynchronous Process Eric
2008-08-25 22:20 ` David Kastrup
@ 2008-08-27 18:39 ` Colin S. Miller
1 sibling, 0 replies; 4+ messages in thread
From: Colin S. Miller @ 2008-08-27 18:39 UTC (permalink / raw)
To: help-gnu-emacs
Eric wrote:
> Suppose I'm writing a function that will compile 4 files (A, B, C, and
> D). The first three can compile in any order, but D must come last.
> I want the user to have a responsive Emacs while the compilations are
> going on.
>
> I could do (call-process "theCompiler" .... "A")
> (call-process "theCompiler" .... "B") ...
> but then Emacs is "frozen" until all files are compiled.
>
> I could do (start-process ...), but then I can't seem to wait for the
> processes to all exit without causing Emacs to hang.
>
> I know that ELisp doesn't do multithreading. Is it possible to do what
> I want without creating a separate script outside of Emacs?
BTW,
"make -j" from M-x compile will do this, if you are using a Unix-based system.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-27 18:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 22:11 Waiting for Asynchronous Process Eric
2008-08-25 22:20 ` David Kastrup
2008-08-26 20:03 ` Eric
2008-08-27 18:39 ` Colin S. Miller
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).