mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
collect a little in call-with-new-thread
* libguile/threads.c (scm_call_with_new_thread): Collect a little before making a new thread. Our adjust_gc_frequency hack doesn't work well if the main allocation load is thread creation, as in https://savannah.gnu.org/bugs/?34140. This does not appreciably affect the speed of the test in that bug, but does effectively limit the image size.
This commit is contained in:
parent
7a4eb5e5ec
commit
9f7537dcab
1 changed files with 1 additions and 0 deletions
|
@ -1006,6 +1006,7 @@ SCM_DEFINE (scm_call_with_new_thread, "call-with-new-thread", 1, 1, 0,
|
||||||
SCM_ASSERT (SCM_UNBNDP (handler) || scm_is_true (scm_procedure_p (handler)),
|
SCM_ASSERT (SCM_UNBNDP (handler) || scm_is_true (scm_procedure_p (handler)),
|
||||||
handler, SCM_ARG2, FUNC_NAME);
|
handler, SCM_ARG2, FUNC_NAME);
|
||||||
|
|
||||||
|
GC_collect_a_little ();
|
||||||
data.parent = scm_current_dynamic_state ();
|
data.parent = scm_current_dynamic_state ();
|
||||||
data.thunk = thunk;
|
data.thunk = thunk;
|
||||||
data.handler = handler;
|
data.handler = handler;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue