caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Weak array semantics with mutually recursive values.
@ 2011-01-22 16:29 Christophe Raffalli
       [not found] ` <4d3b1a5d.ccefd80a.600d.177e@mx.google.com>
  2011-01-24 12:45 ` Damien Doligez
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe Raffalli @ 2011-01-22 16:29 UTC (permalink / raw)
  To: OCaml

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]


Hello,

Consider two mutually recursive values:

let rec x = (1,y) and y = (2,x)

for instance. They will become unreachable by the GC at the same cycle.
However,
if they are both added in a weak array, it seems that they may not be
removed at the same time from the array.

I have some code that seems to show that most of the time they are
removed at the same times, but very rarely this fails.

The description in weak.mli does not imply this, because it just says
"may be removed" and not "must be removed".

What do you think about this ?

Regards,
Christophe




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-26 13:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22 16:29 [Caml-list] Weak array semantics with mutually recursive values Christophe Raffalli
     [not found] ` <4d3b1a5d.ccefd80a.600d.177e@mx.google.com>
2011-01-22 19:41   ` Christophe Raffalli
2011-01-24 12:45 ` Damien Doligez
2011-01-24 21:41   ` Christophe Raffalli
2011-01-26 13:13     ` Damien Doligez

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).