[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Threads in emacs implementation
From: |
Ted Zlatanov |
Subject: |
Re: Threads in emacs implementation |
Date: |
Mon, 20 Jun 2005 14:04:16 -0400 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.3.50 (gnu/linux) |
On Fri, 17 Jun 2005, address@hidden wrote:
> I'm thinking of ways to avoid the stack penalties the other proposals
> involve. Could we allow only secondary threads with thread-local
> variables and forked copies of globals?
>
> "Forked copies of globals" would mean copies of the values of
> thousands of Lisp symbols. And how would the Lisp interpreter know
> whether and where to look for them? It does not seem practical.
Don't make copies of the globals then, unless they are modified.
If the secondary thread modifies a global, make the copy then (Copy On
Write).
If the primary thread modifies a global, trigger a copy for every
thread of the OLD value (null op if no threads exist).
The interpreter would just have to keep a hashtable of hashtables;
primary key is the secondary thread ID and the secondary key is the
global symbol. When a thread modifies a global, look in the HoH; if
the symbol is not in there you create an entry. To get a symbol value
in a thread, you do two hashtable lookups; in the primary thread
there's no lookups.
There should be a way that a thread can send data back to the main
thread on request (the main thread asks for the data).
Ted
- Re: Threads in emacs implementation, (continued)
- Re: Threads in emacs implementation, Richard Stallman, 2005/06/09
- Re: Threads in emacs implementation, Ted Zlatanov, 2005/06/10
- Re: Threads in emacs implementation, Masatake YAMATO, 2005/06/11
- Re: Threads in emacs implementation, Richard Stallman, 2005/06/11
- Re: Threads in emacs implementation, Ted Zlatanov, 2005/06/15
- Re: Threads in emacs implementation, Miles Bader, 2005/06/15
- Re: Threads in emacs implementation, Ted Zlatanov, 2005/06/16
- Re: Threads in emacs implementation, Miles Bader, 2005/06/16
- Re: Threads in emacs implementation, Ted Zlatanov, 2005/06/17
- Re: Threads in emacs implementation, Richard Stallman, 2005/06/17
- Re: Threads in emacs implementation,
Ted Zlatanov <=
- Re: Threads in emacs implementation, Richard M. Stallman, 2005/06/21
- Re: Threads in emacs implementation, Nic Ferrier, 2005/06/21
- Re: Threads in emacs implementation, Richard M. Stallman, 2005/06/22
- Re: Threads in emacs implementation, Miles Bader, 2005/06/19
- Re: Threads in emacs implementation, Nic Ferrier, 2005/06/20
- Re: Threads in emacs implementation, David Kastrup, 2005/06/20
- Re: Threads in emacs implementation, Nic Ferrier, 2005/06/20
- Re: Threads in emacs implementation, Lennart Borgman, 2005/06/20
- Re: Threads in emacs implementation, Ted Zlatanov, 2005/06/20
Re: Threads in emacs implementation, tomas, 2005/06/08