emacs-devel
[Top][All Lists]
Advanced

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

Re: async.el: A simple asynchronous framework for Emacs


From: Stefan Monnier
Subject: Re: async.el: A simple asynchronous framework for Emacs
Date: Tue, 19 Jun 2012 17:46:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>>> This will execute the lambda (which must *not* be byte-compiled -- in other
>>> words, don't use `function' or #') in a child Emacs asynchronously.
>> Can you explain why it can't be byte-compiled?
> Because it becomes an un-`read'-able value if prin1'd.

The byte-compiler uses prin1 to generate the .elc files, so I'm pretty
sure there's a way to solve this problem ;-)

>> Also, I'd guess that your package could be improved if Emacs provided
>> a `fork' primitive, right?
> You bet.  However, I would almost never want to fork the whole
> environment.  I would want the child to end up with nil values for:

>     timer-list
>     timer-idle-list
>     kill-emacs-hook

Yes, it can't just be a naive call to `fork' because it also has to
forget about all the frames and sub-processes.  Also `fork' is probably
unavailable under Windows, so the Elisp functionality should work both
with and without `fork' (i.e. we can't rely too much on `fork's
semantics, we can only use it to improve performance or save us the
trouble of "finding the same `emacs' executable in $PATH").


        Stefan



reply via email to

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