all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>, emacs-devel@gnu.org
Subject: Re: read-event in batch mode
Date: Fri, 31 Jan 2014 10:34:23 -0500	[thread overview]
Message-ID: <jwv7g9gyxua.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83txck5hbe.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 Jan 2014 16:58:29 +0200")

> The "keyboard buffer" is a misnomer: that's actually the Emacs event
> queue, where all kinds of events end up, and from which they are read
> and processed.  Why is it a good idea to have more than one event
> queue?

Because some events should be processed in a particular order and others
in a different order.  They correspond to different "threads" of
execution.  The "keyboard buffer" normally corresponds to events coming
from the user, so their relative ordering is very important and should
not be changed.

But D-Bus events or file-notification events may be triggered by
processing that's completely independent/asynchronous from the user's
actions, so they should be processed by Emacs without having to wait for
previous user-events to be processed.

The typical use case: user types a command which involves communication
over D-Bus, then hit key "b", then the first command starts, sends
some D-Bus message, waits for the answer: if the answer comes after key
"b", we're in a "deadlock" where "b" won't be processed before the
command is completed, but the command won't complete before the D-Bus
answer is received and processed.


        Stefan



  reply	other threads:[~2014-01-31 15:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 11:48 read-event in batch mode Eli Zaretskii
2014-01-31 13:43 ` Michael Albinus
2014-01-31 14:58   ` Eli Zaretskii
2014-01-31 15:34     ` Stefan Monnier [this message]
2014-01-31 16:16       ` Eli Zaretskii
2014-02-04 11:54         ` Michael Albinus
2014-02-04 15:57           ` Eli Zaretskii
2014-02-04 18:16         ` Stefan Monnier
2014-01-31 14:09 ` Stefan Monnier
2014-01-31 15:03   ` Eli Zaretskii
2014-02-02 12:11     ` Nix
2014-02-02 15:59       ` Eli Zaretskii
2014-02-02 19:25         ` Michael Albinus

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=jwv7g9gyxua.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.