[Top][All Lists]

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

Re: multi-threaded Emacs

From: Stefan Monnier
Subject: Re: multi-threaded Emacs
Date: Sun, 30 Nov 2008 16:46:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> I don't think that thread-local data has the same meaning as
> buffer-local, frame-local or terminal-local.

Indeed.  But the implementation may use the same code (to a large
extent at least).

> Do you see any situation that there is need to store a value on a
> specific thread?

let-binding, of course.  It's probably the only one that matters
(besides the internal ones like current_buffer).

>> I'm not sure what you mean by "a global lock".  The question is not only
>> how many locks, but what they protect.  My proposal further down to
>> start with "only one thread active at a time" is what I'd call "a global
>> lock".
> If we use a lock (or locks) to protect shared data still threads can be
> executed in parallel while they working on thread local data.

That basically means adding lock&unlock around `symbol-value' and
pretty much every primitive.  I expect this will take a significant
amount of work, will lead to a significant performance hit, and will not
expose much parallelism, if any.


reply via email to

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