From: Eli Zaretskii <eliz@gnu.org>
To: "Elias Mårtenson" <lokedhs@gmail.com>
Cc: lokedhs@gmail.com, emacs-devel@gnu.org
Subject: Re: The event handling thread
Date: Wed, 21 Dec 2016 19:42:28 +0200 [thread overview]
Message-ID: <831sx12n7f.fsf@gnu.org> (raw)
In-Reply-To: <CADtN0WJro-XR_G-jiZAnKWpiKS7q7MuDVEGH-nhSBaM2xtR-cw@mail.gmail.com> (message from Elias Mårtenson on Wed, 21 Dec 2016 19:05:39 +0800)
> From: Elias Mårtenson <lokedhs@gmail.com>
> Date: Wed, 21 Dec 2016 19:05:39 +0800
>
> On 21 December 2016 at 09:04, John Wiegley <jwiegley@gmail.com> wrote:
>
> >>>>> Eli Zaretskii <eliz@gnu.org> writes:
>
> > To see the above machinery in action, try this:
>
> > (defun infloop ()
> > (with-temp-buffer (while t (insert "foo"))))
>
> > (make-thread #'infloop "thread-loop")
>
> > As soon as you start the looping thread, any keyboard input, like M-x or
> > cursor motion commands, doesn't have any effect, until you type C-g (which
> > causes the looping thread to exit), because the looping thread never yields.
>
> Ah, this is the bit I was missing. It's clear to me now, thanks.
>
> But that doesn't change the fact that it makes more sense to never allow keyboard input to be processed by
> anything other than the main thread?
Why does it make more sense than, say, serialize access to the
minibuffer such that only one thread can access it at a time?
> C-g isn't "normal" keyboard input, is it?
It depends. It's a bit of both, at least on GUI frames.
next prev parent reply other threads:[~2016-12-21 17:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 4:01 Threading IO-bound functions Elias Mårtenson
2016-12-16 15:26 ` Eli Zaretskii
2016-12-19 3:03 ` Elias Mårtenson
2016-12-19 3:39 ` Eli Zaretskii
2016-12-19 7:06 ` Elias Mårtenson
2016-12-19 17:32 ` Eli Zaretskii
2016-12-19 17:43 ` The event handling thread (was: Threading IO-bound functions) John Wiegley
2016-12-20 16:08 ` Eli Zaretskii
2016-12-21 1:04 ` The event handling thread John Wiegley
2016-12-21 11:05 ` Elias Mårtenson
2016-12-21 17:42 ` Eli Zaretskii [this message]
2016-12-22 3:12 ` Elias Mårtenson
2016-12-22 17:37 ` Eli Zaretskii
2016-12-16 22:05 ` Threading IO-bound functions Ken Raeburn
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=831sx12n7f.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lokedhs@gmail.com \
/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.