caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] application scope for hashtable on weak pointers
@ 2012-03-03 18:21 Philippe Strauss
  2012-03-04 18:02 ` Daniel Bünzli
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Strauss @ 2012-03-03 18:21 UTC (permalink / raw)
  To: caml-list

I'm puzzled by this superb sentence in the refman:

"A weak hash table is a hashed set of values.
Each value may magically disappear from the
set when it is not used by the rest of the program any more."

I have a use case for an hashtable of values who'll needs to get aged and removed after a while,
what can I reuse of the standard lib, under which conditions are the values collected by the GC ?

my use case would be to first age out when a threshold of number of bindings is reached, also, after some wall time, flush oldest entries (LRU). 


--
Philippe Strauss
http://www.strauss-acoustics.ch/







^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <4F527560.6010409@free.fr>]

end of thread, other threads:[~2012-03-04 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-03 18:21 [Caml-list] application scope for hashtable on weak pointers Philippe Strauss
2012-03-04 18:02 ` Daniel Bünzli
     [not found] <4F527560.6010409@free.fr>
2012-03-03 19:50 ` Tiphaine Turpin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).