GNU bug report logs - #64819
30.0.50; condition-wait not interruptible

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Mon, 24 Jul 2023 06:33:02 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 64819 <at> debbugs.gnu.org
Subject: bug#64819: 30.0.50; condition-wait not interruptible
Date: Tue, 25 Jul 2023 15:18:29 +0300
> From: Helmut Eller <eller.helmut <at> gmail.com>
> Cc: 64819 <at> 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.




This bug report was last modified 1 year and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.