[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for fields of `struct buffer'
From: |
Helmut Eller |
Subject: |
Re: Patch for fields of `struct buffer' |
Date: |
Sat, 12 Feb 2011 10:16:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
* Tom Tromey [2011-02-11 21:59] writes:
> Helmut> Where "task.el" is a file containing the program that does all the
> Helmut> work. A worker starts with an (almost) empty environment and must
> Helmut> initialize all needed state from zero.
>
> This seems very impractical to me.
Why?
> Helmut> In particular if some library is
> Helmut> needed it must be loaded explicitly (that's not visible in the parent
> Helmut> thread). A worker can only communicate with other threads via pipes
> (I
> Helmut> think workers exchange Javascript objects in JSON format in HTML5;
> maybe
> Helmut> we would use sexps for Emacs).
>
> A variant of this idea is either to add a `fork' primitive to Emacs (not
> portable, more's the pity) or just spawn a headless Emacs with
> bidirectional communication. With the fork approach you could even do
> fancy things like let the child inherit and take over some network
> connections.
Inheritance is not strictly needed. File descriptors could be passed
over Unix sockets.
> This approach is somewhat heavy, as you say. Also, I think initializing
> the new environment (in the spawn model) is non-trivial. All those
> globals do matter...
A copy-on-write scheme is difficult; starting from zero seems much simpler.
Helmut
- Re: Patch for fields of `struct buffer', (continued)
- Re: Patch for fields of `struct buffer', Stefan Monnier, 2011/02/01
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/01
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/06
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/08
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/08
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/11
- Re: Patch for fields of `struct buffer',
Helmut Eller <=
- Re: Patch for fields of `struct buffer', Stefan Monnier, 2011/02/08
Re: Patch for fields of `struct buffer', Richard Stallman, 2011/02/01
Re: Patch for fields of `struct buffer', Richard Stallman, 2011/02/01
Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/01