GNU bug report logs -
#10836
guardians and weak references
Previous Next
Full log
Message #14 received at 10836 <at> debbugs.gnu.org (full text, mbox):
Hi Mark,
Thanks for your thoughts :-)
On Wed 29 Feb 2012 02:22, Mark H Weaver <mhw <at> netris.org> writes:
> Is there a need for weak-key tables that use something other than 'eq?'
> as the predicate?
There are two examples in Guile. One is (ice-9 poe), and the other is
the symbol table.
> It's not clear to me that any other predicate makes
> sense for a weak-key table.
It wasn't clear to me either, but given those two examples, it makes me
hesitant to remove that functionality.
> On the other hand, even for 'eq?' weak-key tables, there's another way
> to retrieve entries without the key: the table iterators 'hash-fold' et
> al. I guess this introduces the same race for _any_ kind of hash table.
Yes. I am wondering whether or not to expose this choice to the user --
they could choose to have the associations present after finalization
(i.e., after a guardian has resurrected an object), or they could choose
to see updates atomically (avoiding this race). There is a relevant
thread on the libgc list:
http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/4787/focus=4793
Regards,
Andy
--
http://wingolog.org/
This bug report was last modified 13 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.