emacs-devel
[Top][All Lists]
Advanced

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

Re: multi-threaded Emacs


From: Richard M Stallman
Subject: Re: multi-threaded Emacs
Date: Tue, 09 Dec 2008 12:26:28 -0500

    > What is the condition for thread-switching in your latest version?

    The `yield' primitive must be explicitly called.

I think that interface won't work very well, because it would require
changing every Lisp program to make it cooperate with other threads.
We need to put this into the C level.

If making QUIT do this is not safe, we could write another macro
YIELD to do it, and call that macro where appropriate.

But that macro needs to be very fast when it does NOT switch threads!

Here's an idea.  Suppose the YIELD macro increments a counter and
switches threads (round robin?) when that counter reaches a certain
number.  Every thread-switch would reset the counter to 0.
Of course, waiting (in wait_reading_process_output) would also
switch threads.


2. 




reply via email to

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