emacs-devel
[Top][All Lists]
Advanced

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

Re: Multithreading, again and again


From: Dave Abrahams
Subject: Re: Multithreading, again and again
Date: Wed, 19 Oct 2011 16:51:32 -0400
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin)

on Wed Oct 19 2011, Tom Tromey <tromey-AT-redhat.com> wrote:

> [ threading ]
>
> Stefan> We could provide a `fork' primitive, indeed.
>
> My impression is that 'fork' is difficult to implement portably.  You
> could try, I suppose.  Or there's "run a separate Emacs and communicate
> over pipes":
>
> http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00534.html

There are packages that do this today and it works well, but IMO there's
insufficient standard infrastructure available to make it easy, and
that, in general, keeps packages from using process-level concurrency
effectively.  For what it's worth, experiments show that launching emacs
as a scripting engine (e.g. using it in a shebang) is actually more
efficient than launching some more traditional scripting languages.

> There are some aspects of sharing that may be hard (file descriptors).
> Also setting up initial state of the worker process is hard if one
> cannot truly fork.
>
> I do wonder why there hasn't been more experimentation with this
> approach, though, given that it is doable today just by running emacs as
> a subprocess.

Again, I think some beautiful and usable library code could make this
approach much more attractive and more widely used.  Emacs IPC anyone?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




reply via email to

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