[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.
-Miles
--
Brain, n. An apparatus with which we think we think.
- Re: multi-threaded Emacs, (continued)
- Re: multi-threaded Emacs, Stefan Monnier, 2008/12/01
- Re: multi-threaded Emacs, Richard M Stallman, 2008/12/02
- Re: multi-threaded Emacs, Stefan Monnier, 2008/12/02
- Re: multi-threaded Emacs, Giuseppe Scrivano, 2008/12/02
- Re: multi-threaded Emacs, Stefan Monnier, 2008/12/02
- Re: multi-threaded Emacs, Giuseppe Scrivano, 2008/12/03
- Re: multi-threaded Emacs, Stefan Monnier, 2008/12/03
- Re: multi-threaded Emacs, Richard M Stallman, 2008/12/04
- Re: multi-threaded Emacs, Giuseppe Scrivano, 2008/12/05
- Re: multi-threaded Emacs,
Miles Bader <=
- Re: multi-threaded Emacs, Paul R, 2008/12/05
- Re: multi-threaded Emacs, Eli Zaretskii, 2008/12/05
- Re: multi-threaded Emacs, Paul R, 2008/12/05
- Re: multi-threaded Emacs, Helmut Eller, 2008/12/05
- Re: multi-threaded Emacs, Stefan Monnier, 2008/12/05
- Re: multi-threaded Emacs, Ted Zlatanov, 2008/12/05
- Re: multi-threaded Emacs, Tom Tromey, 2008/12/05
- Re: multi-threaded Emacs, Miles Bader, 2008/12/05
- Re: multi-threaded Emacs, Helmut Eller, 2008/12/06
- Re: multi-threaded Emacs, Stefan Monnier, 2008/12/06