diff options
author | Andy Wingo <wingo@pobox.com> | 2011-11-29 20:26:40 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-11-29 20:26:40 +0100 |
commit | 9f7537dcabbded64afd631c0d57c84aced8173c5 (patch) | |
tree | 9525e923f83ab9d31c31f65b6badb0b260db2b61 | |
parent | 7a4eb5e5ece4ec456a4d0974463393199094708c (diff) | |
download | guile-9f7537dcabbded64afd631c0d57c84aced8173c5.tar.gz |
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.
-rw-r--r-- | libguile/threads.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/threads.c b/libguile/threads.c index e4d3e2181..f71c83c5a 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -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)), handler, SCM_ARG2, FUNC_NAME); + GC_collect_a_little (); data.parent = scm_current_dynamic_state (); data.thunk = thunk; data.handler = handler; |