Thanks, Norbert, I integrated your change.
I changed the migration script to make it also work if people do
updates in an image that already has values registered for
finalization, and for all existing weak registries, not only for the
finalization registry. Like this the code and the state are in sync:
WeakRegistry allInstancesDo: [ :each |
(each instVarNamed: 'valueDictionary')
primitiveChangeClassTo: WeakIdentityKeyDictionary basicNew;
rehash ].
Cheers,
Adrian
On Jun 18, 2008, at 21:40 , Norbert Hartl wrote:
On Wed, 2008-06-18 at 21:37 +0200, Adrian Lienhard wrote:
Hi Norbert,
We do this kind of scripts in the ScriptLoader. Just let me know when
you published your slice and I will prepare the ScriptLoader update
script which Stef can then push into the update stream.
I published the slice 1 minute before sending the mail :)
Have fun,
Norbert
Adrian
On Jun 18, 2008, at 19:30 , Norbert Hartl wrote:
So,
now I'm all for fixing it and ressurect the test case.
I'll upload something to PharoInbox. Afterwards it needs
to be reinitialized. What is the preferred way of having
doits in the update stream?
Anyway I uploaded SLICE-WeakRegistryAndFinalizerTestFix
to PharoInbox.
afterwards a
WeakRegistry default initialize: WeakRegistry default size
will be necessary.
Norbert
From: Andreas Raab <[EMAIL PROTECTED]>
Date: June 18, 2008 7:02:11 PM GMT+02:00
To: The general-purpose Squeak developers list <[EMAIL PROTECTED]
Subject: [squeak-dev] Re: Bug in object finalization?
Reply-To: The general-purpose Squeak developers list <[EMAIL PROTECTED]
Norbert Hartl wrote:
On Wed, 2008-06-18 at 09:22 -0700, Andreas Raab wrote:
Norbert Hartl wrote:
There was a test in 3.9 testing this (it failed). In 3.10
the test got removed but I think it is a bug.
What do you think?
The test itself is buggy (see http://bugs.squeak.org/view.php?id=6347)
but once you fix the test it illustrates a problem in
WeakRegistry which needs to use a WeakIdentityKeyDictionary
instead of a WeakKeyDictionary.
Ok, what I said. Do you see an harmful side effects by exchanging
the dictionary?
No - we've fixed this a long time ago in our code base.
Cheers,
- Andreas
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project