[Top][All Lists]

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

Re: multi-threaded Emacs

From: Miles Bader
Subject: Re: multi-threaded Emacs
Date: Fri, 05 Dec 2008 17:20:08 +0900

Giuseppe Scrivano <address@hidden> writes:
>> I am surprised.  Perhaps you're right, but why do you think so?
>> Anywhere that calls QUIT is a place where it is safe for an error to happen,
>> so why not a thread switch?
> The cooperative threads approach moves to Elisp packages more work as
> they will have explicitly to yield control but it simplifies a lot the
> C code.  I already started to change my code to allow only the
> execution of a thread at a time and add a `yield' primitive.

No, it will will likely have almost no effect on lisp code, because
99.9% of the code won't be affected, and the lack of pre-emption allows
that code to continue making traditional assumptions.

The only changes required will be in places that are known to be
long-running, where sticking in a few strategic calls to (yield) will
probably relieve most of the problem.

This is because emacs, being an interactive system, generally doesn't
have a lot of long-running code.  It's the relatively few exceptions to
this rule (e.g. gnus reading in new messages) that are the main issues
in practice.  Fixing those places will probably yield a lot of benefit
for (relatively) small amount of work.


Brain, n. An apparatus with which we think we think.

reply via email to

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