<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/11/659715962834b450cc1e0aeddeb9dc7e"
  from="Aleksey Nogin &lt;nogin@c...&gt;"
  author="Aleksey Nogin"
  date="2003-11-14T22:08:47"
  subject="[Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed?"
  prev="2003/11/489bd6bb052f90989375079e3ea60970"
  next="2003/11/02489bb50f9a8ec14ffcd298c9d1d353"
  next-in-thread="2003/11/b7bbbfa5d21e8ef59cb6c359297b900e"
  prev-thread="2003/11/34f26b24813463c04244b74a889dc2a3"
  next-thread="2003/11/103bd2a0bb9d04f75ede2511ba7c99af"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed?">
<msg 
  url="2003/11/659715962834b450cc1e0aeddeb9dc7e"
  from="Aleksey Nogin &lt;nogin@c...&gt;"
  author="Aleksey Nogin"
  date="2003-11-14T22:08:47"
  subject="[Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed?">
<msg 
  url="2003/11/b7bbbfa5d21e8ef59cb6c359297b900e"
  from="Damien Doligez &lt;damien.doligez@i...&gt;"
  author="Damien Doligez"
  date="2003-11-18T12:20:53"
  subject="Re: [Caml-list] Is Weak.get guaranteed to return Some until finalisation is executed?">
</msg>
</msg>
</thread>

<contents>
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

</contents>

</message>

