[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: John Wiegley
Subject: Re: Are there plans for a multi-threaded Emacs?
Date: Mon, 17 Nov 2003 22:52:41 -0800
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (darwin)

David Masterson <address@hidden> writes:

> If not multi-threading, could Emacs be made stronger in
> multi-tasking?  For instance, if the display-engine could be
> separated from the lisp-engine parts, then perhaps a mini-scheduler
> could fork off lisp-engines as needed (or requested) to process
> complicated things.  The "engines" would theoretically be lighter
> weight than Emacs proper, but not as light-weight as multi-threading
> would allow.

Perhaps multi-threading could be allowed in a rather brain-damaged
way, using global-scope critical regions:

    All current Lisp code would run in a MAIN region, in which only
one thread could execute at a time, and each thread would have to give
up control to allow any others to run.

    Then we add (with-critical-region NAME ...), and the ability to
create such regions, so that Gnus, for example, could run in its own
happy little space, blocking if it ever needed to do things outside of
that space (and then grabbing control when the space was available).

    This at least gives the maintainer a way of creating a world apart
that could run in conjunction with the rest of Emacs.  Since what I
think most people want from threading is the ability to give long-
running Emacs modules a chance to do their work while they continue


reply via email to

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