From: Tom Tromey <tromey@redhat.com>
To: Emacs discussions <emacs-devel@gnu.org>
Subject: Re: [0/10] threads for emacs
Date: Thu, 09 Aug 2012 13:59:48 -0600 [thread overview]
Message-ID: <87obmjdeff.fsf@fleche.redhat.com> (raw)
In-Reply-To: <87zk63eu2p.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu, 09 Aug 2012 13:36:30 -0600")
Tom> Plus I have a to-do list...
I thought it would be worthwhile to post it.
First, I think the patches I've posted are all (except maybe #9 and #10)
necessary for a first cut at threads in Emacs.
There are a few other things I think are necessary before the feature
can be easily useful:
* Documentation
* Emacs Lisp condition variable code. This is probably not too hard.
* Changes to the process code so that a process can be restricted to
having its output accepted by a single thread. (In fact I think the
default should be to do this for the creating thread.) This avoids
introducing bugs into lisp code that may currently make assumptions
about let bindings visible to process filters.
* Hook into the Emacs I/O code so that the global lock is released when
a thread enters 'select' (and maybe other primitives). I think this
is a bit harder than it sounds, mostly because I think you don't want
multiple threads to select on the same fds. It probably requires the
process changes.
* Figure out what, if anything, to do about the lisp debugger,
redisplay, and the keyboard when running a "non-background" thread.
* More tests
Some nice-to-have things:
* Have mutex-lock automatically detect deadlocks.
* Add a mutex function to see what thread owns a lock.
Less sure about this one, but it seems handy for debugging.
* See if we can make it so there is a thread per keyboard.
* (provide 'thread) at the right spot
* Some convenience macros, like 'with-mutex'
* Change gnus so 'g' runs in the background. Isn't that what this is
really all about?
The far-flung future, aka stuff I don't anticipate getting to:
* Redo the bindings code to be more efficient
* Change thread switching to happen more often, say every N calls to
QUIT.
* Eventually, remove the interpreter lock. I think the current design
still allows this (though some details in the current code would have
to be changed). This is very tricky though.
Tom
next prev parent reply other threads:[~2012-08-09 19:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 19:36 [0/10] threads for emacs Tom Tromey
2012-08-09 19:59 ` Tom Tromey [this message]
2012-08-10 1:42 ` Daniel Colascione
2012-08-13 14:26 ` Tom Tromey
2012-08-19 14:09 ` Wojciech Meyer
2012-08-14 14:51 ` Tom Tromey
2012-08-12 17:30 ` Dmitry Antipov
2012-08-13 14:39 ` Tom Tromey
2012-08-14 14:52 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87obmjdeff.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.