mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
with a threaded guile, lock weak sets and tables during a fork
* libguile/weak-set.c (make_weak_set): * libguile/weak-table.c (make_weak_table): If we have a threaded Guile, * keep a weak set (table) of weak sets (tables). Use this and the pthread_atfork mechanism to lock and unlock weak sets and weak tables during a fork(). * libguile/weak-set.h (scm_weak_set_prehistory): New internal API. * libguile/init.c: Add call to scm_weak_set_prehistory().
This commit is contained in:
parent
58565208bd
commit
f609480611
4 changed files with 194 additions and 28 deletions
|
@ -383,6 +383,7 @@ scm_i_init_guile (void *base)
|
|||
|
||||
scm_storage_prehistory ();
|
||||
scm_threads_prehistory (base); /* requires storage_prehistory */
|
||||
scm_weak_set_prehistory (); /* requires storage_prehistory */
|
||||
scm_weak_table_prehistory (); /* requires storage_prehistory */
|
||||
#ifdef GUILE_DEBUG_MALLOC
|
||||
scm_debug_malloc_prehistory ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue