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

Re: Emacs related.



jeffrin  <jeffrin@msservices.org> writes:
J> It is said that emacs is single threaded.

Yup.

J> * Why is it so ?
J> * Is there any work in progress to make it multithreaded ?
J> * Is there any disadvantage or disadvantages if it is
J>   multithreaded.

Well, aside from the buzzword-coolness, there's nothing intrinsically
better about multithreaded applications in most cases.  Even if Emacs
were multithreaded, you wouldn't notice unless you were doing a fairly
restricted set of things, generally involving doing large amounts of
processing within Emacs proper.  (Gnus does tend to, though; the main
side-effects would be Emacs redrawing while it's processing and being
able to do other things while Gnus is slurping in mail.)

That having been said, it's a major pain to write safe, reliable
multithreaded code, especially for something as big as Emacs that has
a lot of legacy code.  Consider the problem of doing a background
update for something like Gnus: you'd not only need a multithreaded
backend in the Emacs C code, you'd also need multithreaded Lisp.
Which means you'd need to rewrite *all* of the existing elisp code out
there to be thread-aware, which is just painful.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: