all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 65837@debbugs.gnu.org
Subject: bug#65837: 30.0.50; Debugger in non-main threads
Date: Sat, 09 Sep 2023 19:46:22 +0300	[thread overview]
Message-ID: <83il8jthup.fsf@gnu.org> (raw)
In-Reply-To: <m2h6o32u4e.fsf@gmail.com> (message from Helmut Eller on Sat, 09 Sep 2023 18:23:29 +0200)

> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: 65837@debbugs.gnu.org
> Date: Sat, 09 Sep 2023 18:23:29 +0200
> 
> On Sat, Sep 09 2023, Eli Zaretskii wrote:
> 
> >> Is there a design/plan for how recursive-edit is supposed to work in
> >> non-main threads?
> >
> > Not that I know of, no.  But you seem to be asking mainly about
> > reading events, not about recursive-edit?
> 
> Well, the debugger calls recursive-edit and if it's not clear what
> recursive-edit is supposed to do, then replacing recursive-edit with
> something more reliable would be my first step to improving the
> debugger.

If recursive-edit is run by the same thread which was running before
the debugger was entered, and the debugger never calls one of the
primitives that enter the idle loop (sit-for etc.), then I don't think
problems will happen, because it basically means the thread which
entered the debugger keeps running.  But if the debugger causes its
thread to yield, some other thread could grab the global lock, and
then all hell will break loose.

So I think the only reasonably practical way to make this particular
use case stable is to disable thread switching for as long as the
debugger is active.  WDYT?





  reply	other threads:[~2023-09-09 16:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09  9:15 bug#65837: 30.0.50; Debugger in non-main threads Helmut Eller
2023-09-09 11:14 ` Eli Zaretskii
2023-09-09 15:35   ` Helmut Eller
2023-09-09 15:57     ` Eli Zaretskii
2023-09-09 16:23       ` Helmut Eller
2023-09-09 16:46         ` Eli Zaretskii [this message]
2023-09-09 17:24           ` Helmut Eller
2023-09-09 17:37             ` Eli Zaretskii
2023-09-09 18:29               ` Helmut Eller
2023-09-09 18:34                 ` Eli Zaretskii
2023-09-09 18:50                   ` Helmut Eller

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=83il8jthup.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65837@debbugs.gnu.org \
    --cc=eller.helmut@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.