Fix bug #27450 ("Fat mutexes not GC'd until their owner dies").
authorLudovic Courtès <ludo@gnu.org>
Tue, 15 Sep 2009 20:46:55 +0000 (22:46 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 15 Sep 2009 21:05:24 +0000 (23:05 +0200)
commita0faf7ddf9e260916aa1e64cc2ec48ac6925b2d6
tree76f8f2a81384d67eecc5de933d6b65778c3e24db
parentaef9e3bd012fdf7b8fe126d89c48eb22019f0ec8
Fix bug #27450 ("Fat mutexes not GC'd until their owner dies").

* libguile/threads.c (do_thread_exit): Deal with `t->mutexes' being a
  weak list.
  (fat_mutex_lock): Use weak-car pairs when building up `t->mutexes'.

* test-suite/tests/threads.test ("mutex-ownership")["mutex with owner
  not retained (bug #27450)"]: New test.
libguile/threads.c
test-suite/tests/threads.test