From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA18623; Fri, 14 Nov 2003 23:08:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA18882 for ; Fri, 14 Nov 2003 23:08:46 +0100 (MET) Received: from dell.nogin.org (charter-182-203.caltech.edu [131.215.182.203]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAEM8i104785 for ; Fri, 14 Nov 2003 23:08:45 +0100 (MET) Received: from cs.caltech.edu (localhost.localdomain [127.0.0.1]) by dell.nogin.org (8.12.10/8.12.9) with ESMTP id hAEM7YCg008368 for ; Fri, 14 Nov 2003 14:07:34 -0800 Message-ID: <3FB55226.9080707@cs.caltech.edu> Date: Fri, 14 Nov 2003 14:07:34 -0800 From: Aleksey Nogin Organization: California Institute of Technology, Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031023 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; 626:99 caltech:01 caltech:01 imply:02 finalisation:02 finalisation:02 module:03 array:04 array:04 seems:05 e-mail:94 395:93 office:92 office:92 weak:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, Currently the documentation for the Weak module seems to imply that the Weak.get can return None whenever it feels like it. Is there any guarantees as to when things are required to stay in the weak array? In particular, if I call GC.finalise on a heap-allocated value and then stick a value into a weak array, can I be sure that Weak.get will return Some until after the finalisation function is executed (and finishes its execution)? -- Aleksey Nogin Home Page: http://nogin.org/ E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal) Office: Jorgensen 70, tel: (626) 395-2907 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners