[Gc] Unregistering the main thread
ludo at gnu.org
Mon Sep 15 12:09:57 PDT 2008
Guile has an API that allows a program to specify that a given thread is
not going to cooperate for GC for some time. This is useful, e.g., when
a thread enters a blocking system call and doesn't want to prevent other
threads from allocating memory or collecting garbage while it's blocked:
scm_without_guile (the_function_that_blocks, NULL);
On the port of Guile to BDW-GC, I implement it using
`GC_unregister_my_thread ()' and `GC_register_my_thread ()'. However,
it appears that the main thread cannot be unregistered.
What is the main thread supposed to do when it enters, say, a blocking
system call and may not be able to cooperate for GC for a while?
More information about the Gc