Closed MarcusDenker closed 8 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.
There is FLPlatform current
that returns e.g. an instance of FLPharo11Platform
, or the corresponding one. What should be moved there to support ephemerons?
@tinchodias, same here, Fuel-Platform is no longer in Pharo 12+. We can implement this however we want.
This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.
I'm still not familiar with the ephemerons. I see in my Pharo 12 image:
Smalltalk allClasses select: [ :each | each isEphemeronClass ]
">>> an OrderedCollection(FinalizationRegistryEntry IllEphemeron WeakKeyAssociation)"
I'm not sure what should fuel serializer do when it finds an instance of those classes.
For example:
Association << #FinalizationRegistryEntry
layout: EphemeronLayout;
slots: { #container . #link };
tag: 'Registry';
package: 'System-Finalization'
Probably it should serialize ignore what is referenced in container
and link
slots.
The implementation for the variable weak objects was ignoring the objects pointed from the variable slots, but not serializing the fixed slots as if it was a regular object.
I think we can handle Ephemerons the same way we do weak classes: attempt to serialize the references (might be nil
during serialization if the GC has kicked in), making sure not to collect the references into a collection that references the key strongly.
I've updated the Pharo12 branch to delegate cluster determination to the class layout. Now we can implement support for ephemerons.
@tinchodias @MarcusDenker https://github.com/pharo-project/pharo/pull/15563
Pharo11 now implemens Ephemerons and uses it to implement Weak datastructures.
Fuel seems to not support serializing them.
I would implement this by forwarding to the Class Layout, but of course Fuel can no do that because it wants to be source level backward compatible to systems that do not have the class layout hierarchy...