From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 64819@debbugs.gnu.org
Subject: bug#64819: 30.0.50; condition-wait not interruptible
Date: Tue, 25 Jul 2023 15:18:29 +0300 [thread overview]
Message-ID: <83351cqj56.fsf@gnu.org> (raw)
In-Reply-To: <m2pm4g8lf3.fsf@gmail.com> (message from Helmut Eller on Tue, 25 Jul 2023 10:06:40 +0200)
> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: 64819@debbugs.gnu.org
> Date: Tue, 25 Jul 2023 10:06:40 +0200
>
> On Mon, Jul 24 2023, Eli Zaretskii wrote:
>
> [...]
> > So for this to work, the C-g handler will have to release some thread.
>
> Here is a patch that works good enough for me:
Thanks. If you are currently working on or using some packages that
use Lisp threads, please run with this patch for a while and come back
in a couple of weeks if you see no problems with it; then we can
install this on master. (It will need a small addition for
MS-Windows, but that can be handled later.) A test for this, if
possible, would also be appreciated, even if it can only be run
manually (we have the test/manual/ directory for those).
If you do not intend to use threads any time soon, I guess we can
install this on master and let someone else be the guinea pig...
A couple of minor stylistic comments:
> - if (in_signal_handler)
> + if (in_signal_handler) {
> maybe_reacquire_global_lock ();
> + maybe_awake_current_thread();
> + }
Please use the GNU style of braces:
if (something)
{
do_1;
do_2;
}
> +void
> +maybe_awake_current_thread (void)
> +{
> + if (current_thread->wait_condvar != NULL)
> + {
> + sys_cond_broadcast (current_thread->wait_condvar);
> + }
We don't use braces when the body of 'if' has just one statement.
next prev parent reply other threads:[~2023-07-25 12:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 6:32 bug#64819: 30.0.50; condition-wait not interruptible Helmut Eller
2023-07-24 12:10 ` Eli Zaretskii
2023-07-24 12:58 ` Helmut Eller
2023-07-24 13:34 ` Eli Zaretskii
2023-07-24 14:57 ` Helmut Eller
2023-07-24 16:23 ` Eli Zaretskii
2023-07-25 8:06 ` Helmut Eller
2023-07-25 12:18 ` Eli Zaretskii [this message]
2023-07-25 12:59 ` Helmut Eller
2023-09-02 21:58 ` Stefan Kangas
2023-09-03 19:53 ` Helmut Eller
2023-09-06 9:35 ` Stefan Kangas
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=83351cqj56.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64819@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.