emacs-devel
[Top][All Lists]
Advanced

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

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


From: David Kastrup
Subject: Re: Are there plans for a multi-threaded Emacs?
Date: 04 Dec 2003 15:07:07 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Ted Zlatanov <address@hidden> writes:

> > I see these benefits with this model compared to a "fully"
> > multithreaded variant:
> > 
> > o Fairly small changes in the C code.  
> 
> > o No significant change in the elisp execution model, at least not
> > if preemption is avoided.  
> 
> > o Little overhead in locking - there's no fine grained locking on
> > individual data structures.
> 
> I agree with all those.  Converting a single-threaded application to
> multithreaded, especially one as complex as Emacs, is a daunting
> task.  I think it's worthwhile.

Not everything that is worthwhile gets done.  In order to even have a
minuscule chance of having reasonably parallel executable code, we
need to have lexical instead of dynamic scope.  Parallizing code that
is depending on changes of a global namespace for every involved local
variable is near to impossible.

So changing Emacs' scopes to lexical is a prerequisite for any
meaningful attempt at multithreading, anyway.

If we can't find the resources and volunteers for doing this step, we
will certainly not get beyond to the even more ambitious task of
multithreading for which it is an absolutely indispensible
prerequisite in my opinion.

Apart from giving people perhaps more enthusiasm for working on the
lexical binding problem, I don't see what actually workable
perspectives the multithreading buys us.  Even then, it would be
unfair to suggest people that if their desire is to get
multithreading, that finishing some lexical binding project will make
their goal come into easy reach.  It is a prerequisite in my opinion,
but quite far from making the ultimate goal easy to achieve.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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