[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 05/05: Fix gc.test "after-gc-hook gets called" failures.
From: |
Mark H. Weaver |
Subject: |
[Guile-commits] 05/05: Fix gc.test "after-gc-hook gets called" failures. |
Date: |
Tue, 16 Apr 2019 16:57:28 -0400 (EDT) |
mhw pushed a commit to branch stable-2.2
in repository guile.
commit 546b0e87294b837ec29164d87cf17102e9aeee0c
Author: Andrea Azzarone <address@hidden>
Date: Thu Apr 11 16:30:58 2019 +0100
Fix gc.test "after-gc-hook gets called" failures.
* libguile/scmsigs.c (signal_delivery_thread): Call scm_async_tick to
give any pending asyncs a chance to run before we block indefinitely
waiting for a signal to arrive.
---
libguile/scmsigs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index 21b2a95..755e657 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -174,6 +174,14 @@ signal_delivery_thread (void *data)
{
struct signal_pipe_data sigdata;
+ /* This tick gives any pending asyncs a chance to run before we
+ block indefinitely waiting for a signal to arrive. For example
+ it can happen that the garbage collector is triggered while
+ marking the signal handler for future execution. Due to the
+ way the after-gc-hook is designed, without a call to
+ scm_async_tick, the after-gc-hook will not be triggered. */
+ scm_async_tick ();
+
scm_without_guile (read_signal_pipe_data, &sigdata);
sig = sigdata.sigbyte;