mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-08 18:40:23 +02:00
fix hook invocation during thread guilification
* libguile/gc.c (run_before_gc_c_hook): Don't run pre-GC hooks from a thread that is in the process of guilification.
This commit is contained in:
parent
07c2ca0f0d
commit
e1fbe716e8
1 changed files with 4 additions and 0 deletions
|
@ -234,6 +234,10 @@ scm_t_c_hook scm_after_gc_c_hook;
|
||||||
static void
|
static void
|
||||||
run_before_gc_c_hook (void)
|
run_before_gc_c_hook (void)
|
||||||
{
|
{
|
||||||
|
if (!SCM_I_CURRENT_THREAD)
|
||||||
|
/* GC while a thread is spinning up; punt. */
|
||||||
|
return;
|
||||||
|
|
||||||
scm_c_hook_run (&scm_before_gc_c_hook, NULL);
|
scm_c_hook_run (&scm_before_gc_c_hook, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue