all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 45117@debbugs.gnu.org
Subject: bug#45117: 28.0.50; process-send-string mysteriously exiting non-locally when called from timer
Date: Thu, 10 Dec 2020 18:05:54 +0000	[thread overview]
Message-ID: <CALDnm53mvOjPEMnx-8FWayOPvQS123juFozdR51oMQE1ykJyhA@mail.gmail.com> (raw)
In-Reply-To: <jwvr1nxv9it.fsf-monnier+emacs@gnu.org>

On Thu, Dec 10, 2020 at 5:51 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > Aha! I found the culprit.  It is eldoc.el.  It seems to be a
> > longstanding policy to call Eldoc backends with `with-no-input`.  This
> > is obviously badly problematic for aynchronous backends.
>
> Maybe "obviously" so from a pragmatic point of view, but in
> a theoretical sense, I don't see why:

I'm not sure.  Every such async system eventually boils down
to a point that sends something to the wire (step A) and a process
filter (step C) that runs later on and finds some suitable "continuation",
(a callback).  To find that suitable continuation it has to be added
to the continuation registry (step B). I'd say step A and B have to
be atomic, whatever the order.  If you interrupt between
A and B you get either an unexpected reply. If you interrupt between
B and A you get a stale leftover continuation.  Both are inconsistent
state, in my opinion.

There are workarounds for all of this, but I think this while-no-input
isn't conceptually sound there, for this reason.

Actually, thinking more about it. I don't think it's sound to have a
while-no-input at all under library control.  A programmer using
that library should be given a predictable evaluation model. At
any rate, this is a regression from 26.3, where things didn't work
like this.

João





  reply	other threads:[~2020-12-10 18:05 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 11:44 bug#45117: 28.0.50; process-send-string mysteriously exiting non-locally when called from timer João Távora
2020-12-08 15:39 ` Eli Zaretskii
2020-12-08 15:56   ` João Távora
2020-12-08 17:01     ` Eli Zaretskii
2020-12-08 17:05       ` João Távora
2020-12-09 11:24       ` João Távora
2020-12-09 15:33         ` Eli Zaretskii
2020-12-10 15:00           ` João Távora
2020-12-10 15:23             ` Eli Zaretskii
2020-12-10 16:15               ` João Távora
2020-12-10 16:29                 ` João Távora
2020-12-10 17:20                   ` Dmitry Gutov
2020-12-10 17:51                   ` Stefan Monnier
2020-12-10 18:05                     ` João Távora [this message]
2020-12-10 18:37                       ` Stefan Monnier
2020-12-10 18:48                         ` Eli Zaretskii
2020-12-10 18:50                         ` João Távora
2020-12-10 19:44                           ` Eli Zaretskii
2020-12-10 19:47                             ` João Távora
2020-12-10 19:55                               ` Eli Zaretskii
2020-12-10 19:58                                 ` João Távora
2020-12-10 20:14                                   ` Eli Zaretskii
2020-12-10 20:15                                     ` João Távora
2020-12-10 20:37                                     ` Dmitry Gutov
2020-12-10 19:46                           ` Stefan Monnier
2020-12-10 20:12                             ` João Távora
2020-12-10 20:43                               ` Stefan Monnier
2020-12-10 20:55                                 ` Dmitry Gutov
2020-12-10 22:48                                   ` Stefan Monnier
2020-12-10 21:16                                 ` João Távora
2020-12-10 22:58                                   ` João Távora
2020-12-11  7:31                                 ` Eli Zaretskii
2020-12-11 14:31                                   ` Stefan Monnier
2020-12-11 14:40                                     ` Eli Zaretskii
2020-12-11 14:43                                       ` João Távora
2020-12-11 14:41                                     ` João Távora
2020-12-11 14:50                                       ` Stefan Monnier
2020-12-13 23:19                                         ` João Távora
2020-12-14  0:35                                           ` Stefan Monnier
2020-12-10 16:41                 ` Eli Zaretskii

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=CALDnm53mvOjPEMnx-8FWayOPvQS123juFozdR51oMQE1ykJyhA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=45117@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.