[Top][All Lists]
[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
- Re: Multithreading, again and again, Juri Linkov, 2011/10/17
- Re: Multithreading, again and again, Stefan Monnier, 2011/10/17
- Re: Multithreading, again and again, Tom Tromey, 2011/10/19
- Re: Multithreading, again and again,
Dave Abrahams <=
- Re: Multithreading, again and again, Stefan Monnier, 2011/10/19
- Re: Multithreading, again and again, Dave Abrahams, 2011/10/19
- Re: Multithreading, again and again, John Wiegley, 2011/10/20
- Re: Multithreading, again and again, Dave Abrahams, 2011/10/20
- Re: Multithreading, again and again, Richard Stallman, 2011/10/20
- Re: Multithreading, again and again, SAKURAI Masashi, 2011/10/19
- Re: Multithreading, again and again, Tom Tromey, 2011/10/20
- Re: Multithreading, again and again, Stefan Monnier, 2011/10/20
- Re: Multithreading, again and again, SAKURAI Masashi, 2011/10/20
- Re: Multithreading, again and again, Nix, 2011/10/21