[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64819: 30.0.50; condition-wait not interruptible
From: |
Eli Zaretskii |
Subject: |
bug#64819: 30.0.50; condition-wait not interruptible |
Date: |
Tue, 25 Jul 2023 15:18:29 +0300 |
> 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.
- bug#64819: 30.0.50; condition-wait not interruptible, Helmut Eller, 2023/07/24
- bug#64819: 30.0.50; condition-wait not interruptible, Eli Zaretskii, 2023/07/24
- bug#64819: 30.0.50; condition-wait not interruptible, Helmut Eller, 2023/07/24
- bug#64819: 30.0.50; condition-wait not interruptible, Eli Zaretskii, 2023/07/24
- bug#64819: 30.0.50; condition-wait not interruptible, Helmut Eller, 2023/07/24
- bug#64819: 30.0.50; condition-wait not interruptible, Eli Zaretskii, 2023/07/24
- bug#64819: 30.0.50; condition-wait not interruptible, Helmut Eller, 2023/07/25
- bug#64819: 30.0.50; condition-wait not interruptible,
Eli Zaretskii <=
- bug#64819: 30.0.50; condition-wait not interruptible, Helmut Eller, 2023/07/25