[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: Ted Zlatanov
Subject: Re: Are there plans for a multi-threaded Emacs?
Date: Tue, 02 Dec 2003 12:44:10 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

On Tue, 2 Dec 2003, address@hidden wrote:

On Dec 1, 2003, at 10:04 AM, Ted Zlatanov wrote:
>> I think migrating Emacs towards a threading model is possible:
> Maybe this is a stupid question, but what's the payoff you're
> expecting when you're done with this project?  What is it about
> Emacs that makes it worth a major rewrite in order to make it
> multithreaded?  I realize that multithreading will introduce small
> conveniences in some cases, but in general writing multithreaded
> code is a total pain in the neck, so my guess is that the cost of
> those small conveniences would be more than they'd be worth, and you
> might be able to get them cheaper using some other technique, if you
> could identify what they are.

Per already mentioned Gnus.  Generally any place in Emacs where you
could be doing task A while task B is waiting for a blocking resource.
Also, an event-driven model for user interaction would be easier to
implement in a way that's functional for the user.

In a way, this is a very valid question - what can't be done with
processes that threads can do?  You can do almost everything without
threads, but the cost is very high in terms of portability, resource
usage, and ease of use.  Furthermore, as I mentioned, processes are
much harder to couple (for data sharing) than threads.

Ideally, you won't have to worry about multithreading if you don't
want to.  Java allows programmers to mark functions as synchronous,
so only one of it can be running at once.  I proposed doing this by
default for all Emacs functions, and then making them thread-safe
step by step.


reply via email to

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