[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: advice needed for multi-threading patch
From: |
Tom Tromey |
Subject: |
Re: advice needed for multi-threading patch |
Date: |
Fri, 28 Aug 2009 22:57:36 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
>>>>> "Giuseppe" == Giuseppe Scrivano <address@hidden> writes:
Giuseppe> I only now saw this thread and multi-threaded Emacs is still
Giuseppe> in my wish-list :-) Do you already have some working code?
Yeah. Well, I did ... it is not working today because I am in the
middle of changing the variable binding implementation and implementing
buffer locking.
Giuseppe> In my work, I didn't consider threads local storage for two
Giuseppe> reasons the first and most important is that elisp packages
Giuseppe> (yet?) don't know about it and wouldn't use; the second reason
Giuseppe> is that it adds a lot of complexity while I don't see much
Giuseppe> benefits so I chose simplicity.
I suspect we may be talking about different things. When I say
thread-local storage, I just mean having 'let' bindings work properly
when two different threads use the same symbol name.
In case not: my goal was to write the smallest patch that would yield a
usefully multi-threaded Emacs. It seemed to me that the binding issue
had to be dealt with somehow, because ignoring it would mean that the
resulting Emacs could not run any real programs.
As I saw it, the choices were either to undo and redo all the bindings
at every context switch, or implement thread-local bindings. I looked
into both a bit, and thread-local bindings did not seem too hard, except
for defining the semantics of the interaction between multiple threads
and buffer-local variables.
Right now I have something similar to your patch (except using a single
thread-local current_thread pointer instead of arrays); plus changes to
the GC and to make DEFVAR_LISP work.
Tom
- Re: advice needed for multi-threading patch, (continued)
- Re: advice needed for multi-threading patch, Miles Bader, 2009/08/27
- Re: advice needed for multi-threading patch, Juri Linkov, 2009/08/28
- Re: advice needed for multi-threading patch, Miles Bader, 2009/08/28
- Re: advice needed for multi-threading patch, Juri Linkov, 2009/08/28
- Re: advice needed for multi-threading patch, Miles Bader, 2009/08/28
- Re: advice needed for multi-threading patch, Richard Stallman, 2009/08/29
- Re: advice needed for multi-threading patch, Stefan Monnier, 2009/08/26
- Re: advice needed for multi-threading patch, Giuseppe Scrivano, 2009/08/28
- Re: advice needed for multi-threading patch,
Tom Tromey <=