[squeak-dev] Re: [ANN] Hydra VM: A multi-core capable Croquet VM
Andreas Raab
andreas.raab at gmx.de
Sat Feb 23 06:12:27 UTC 2008
John M McIntosh wrote:
>
> On Feb 22, 2008, at 11:12 AM, Andreas Raab wrote:
>>
>> We have this already. It's called an image segment.
>>
>> Cheers,
>> - Andreas
>
>
> Er if you have any fixes or say a technical note talking about how to
> store/read objects using an image segment that would be good. .
Well *the* ground rule is to not use class ImageSegment ;-) The
primitives are simple enough but the code in ImageSegment is ... err ...
difficult to understand (to put it mildly). If you are curious check out
IslandWriter and TIslandWriter in Croquet which use the primitives but
not the code in ImageSegment (of course, they do rely on islands).
The other thing you need to keep in mind is that for image segments to
work you must not introduce rogue pointers to the objects you are trying
to store. If you do, in *any* shape or form you are doomed. This is most
likely the problem you face (it can happen indirectly by leaving a
debugger in the background; by having a delay being active; by some
random mutex being in use etc).
> I'll note in Sophie we use image segments to store the font example
> image cache between restarts that has never given us a problem,
> and we were storing a collection of Assocations where the key was a
> string and the value a Form. This worked oh 99.99% of the time
> but the 0.01% failure rate made us pull the feature and now we write the
> data directly to a file.
Yes, that's what I mean by situations that work "most" of the time. It's
hard to track these down - in Croquet we have rules that allow us to
catch and trace situations in which this goes wrong (the dreaded
CheckpointFailure ;-) Fortunately this has become an excruciatingly rare
situation (basically only if we make a dumb mistake like I just did
today ;-)
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|