From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q23ILZOU031500 for ; Sat, 3 Mar 2012 19:21:35 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgIALZgUk8+3JIE/2dsb2JhbABDgwkQsSeBB4I+gXGIKpkcnziNO4I/YwSbH4oxgmQ X-IronPort-AV: E=Sophos;i="4.73,526,1325458800"; d="scan'208";a="147331474" Received: from a.mx.strauss-acoustics.ch ([62.220.146.4]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Mar 2012 19:21:30 +0100 Received: from [192.168.1.102] (80-218-101-216.dclient.hispeed.ch [80.218.101.216]) by a.mx.strauss-acoustics.ch (Postfix) with ESMTPSA id DA4D0125F1F for ; Sat, 3 Mar 2012 19:21:29 +0100 (CET) From: Philippe Strauss Content-Type: text/plain; charset=us-ascii Date: Sat, 3 Mar 2012 19:21:28 +0100 Message-Id: <29125AD3-36DB-42CA-AC52-71D7F236F427@strauss-acoustics.ch> To: caml-list@inria.fr Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q23ILZOU031500 Subject: [Caml-list] application scope for hashtable on weak pointers 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/