opensubscriber
   Find in this group all groups
 
Unknown more information…

e : emacs-devel@gnu.org 17 June 2005 • 10:09PM -0400

Re: Threads in emacs implementation
by Ted Zlatanov

REPLY TO AUTHOR
 
REPLY TO GROUP




On Fri, 17 Jun 2005, snogglethorpe@gmai... wrote:

> A huge amount of the actively maintained state in Emacs is stored in
> global variables (often buffer-local of course, but still "global"
> as far as threads are concerned).

Thank you for the clarification.

I'm thinking of ways to avoid the stack penalties the other proposals
involve.  Could we allow only secondary threads with thread-local
variables and forked copies of globals?  Then, to modify the main
thread's version of a global variable a special protocol must be
followed (through the VM).  Threads wouldn't be able to access
existing buffers and buffer-local variables without going through the
VM protocol, either (but they can create their own buffers, which will
be isolated within the thread).  The ideal thread would be a pure
function (if I remember my definitions right, a pure function f(x)
depends only on x).

This will make threads more of a utility than a true built-in, and
threaded code would be written especially for that purpose.  Existing
code would continue to run without changes - this will save us
rewriting a huge amount of code.

Is this feasible?  Would this kind of limited threading be useful?

Ted



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu....
http://lists.gnu.org/mailman/listinfo/emacs-devel

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.