Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Aleksey Nogin <nogin@c...>
Subject: [Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed?
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