[Top][All Lists]

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

Re: Are there plans for a multi-threaded Emacs?

From: Ted Zlatanov
Subject: Re: Are there plans for a multi-threaded Emacs?
Date: Mon, 01 Dec 2003 11:04:09 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

On Sun, 30 Nov 2003, address@hidden wrote:

> Then the remaining problem is that possibly a lot of functions
> cannot be safely used because they access global variables.  But
> that is just something that people will have to live with, and maybe
> it will get better over time.  I think that it will be good enough
> at least for some packages to do part of their work in the
> background.

I think migrating Emacs towards a threading model is possible:

- start with all primitive or ELisp functions assumed NOT thread-safe

- allow threads to run, but any access to a function needs to be
  synchronous.  At first, this will effectively make threads simple
  switched tasks, and will probably make Emacs slower.

- gradually migrate functions, starting with the primitives, towards
  whatever threading model Emacs assumes.  Use some kind of function
  attribute to mark thread-safe behavior.  With time, threads will
  become efficient and fast.

The internal implementation of threads will be the difficult part.
It took Perl a LONG time to get working threads internally.

I think heavyweight threads (multiple processes) is not a good choice
for Emacs, because of the heavy interaction and data passing between
the internal functions.


reply via email to

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