From 912308835dd0d3af61976cf1a4c19b60cb348b68 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 25 Apr 2011 16:44:54 +0200 Subject: [PATCH] Make `scm_i_ensure_signal_delivery_thread' call in Guile mode. * libguile/threads.c (on_thread_exit): Move `scm_i_ensure_signal_delivery_thread' call... (do_thread_exit): ... here. --- libguile/threads.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libguile/threads.c b/libguile/threads.c index 66869e7c3..4de819395 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -613,6 +613,10 @@ do_thread_exit (void *v) { scm_i_thread *t = (scm_i_thread *) v; + /* Ensure the signal handling thread has been launched, because we might be + shutting it down. This needs to be done in Guile mode. */ + scm_i_ensure_signal_delivery_thread (); + if (!scm_is_false (t->cleanup_handler)) { SCM ptr = t->cleanup_handler; @@ -687,10 +691,6 @@ on_thread_exit (void *v) case but it doesn't hurt to be consistent. */ scm_i_pthread_setspecific (scm_i_thread_key, t); - /* Ensure the signal handling thread has been launched, because we might be - shutting it down. */ - scm_i_ensure_signal_delivery_thread (); - /* Scheme-level thread finalizers and other cleanup needs to happen in guile mode. */ GC_call_with_stack_base (do_thread_exit_trampoline, t); -- 2.20.1