The ability to turn weakness of a weak array on and off with
#isWeakContainer: appears to be a very useful feature. However, I'm not
clear on how this interacts with incremental GC.
The semantics I *want* are that if I send "isWeakContainer: false", then
from that moment any references I find in my weak array can be relied on
to stay there until I send "isWeakContainer: true".
It seems pretty clear that this will be true with respect to all the
atomic forms of GC. However, it seems possible that if an incremental
mark is underway, and has already put my weak array in its list of weak
collections at the time I send "isWeakContainer: false", then some
referenced objects might be collected and nilled as that GC completes.
That would cause problems for my application (distributed GC between VW
and GemStone).
Am I understanding this correctly? From reading the VM source it looks
like the primitive is just fiddling with the bits in the object header,
while it would have to do more to update the state of an incremental GC
in progress.
Is it enough to do this sequence?:
myWeakArray isWeakContainer: false.
ObjectMemory finishIncrementalGC.
After which any references that are still there are guaranteed to stick
around?
Thanks,
-Martin
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc