News for hackers. Stuff that matters.
Re:Rust: Dropping heavy things in another thread can make yo... by mcguire on Saturday May 30, 2020 @03:40PM (#23363949)
Maintain a collection of objects with finalizers associated with the generation; when an object is moved out of the generation, move the finalizer record with it. Then, just before the generation is discarded, run the finalizers.

If the finalizers do something stupid like resurrect the object, have the runtime system notify someone with the authority to go beat the programmer with a stick.

Re:Rust: Dropping heavy things in another thread can make yo... by Avi-D-coder on Saturday May 30, 2020 @08:32PM (#23366128)
Interestingly for the Rust GC I'm working both Drop and finalizers will be supported.

Do you happen to offer beat the programmer with a stick as a service?

Re:Rust: Dropping heavy things in another thread can make yo... by mcguire on Monday June 01, 2020 @02:26PM (#23381913)
Unfortunately, no, but you are going to need it.

I was fooling with a cycle-collected reference counter for Rust for a while, but eventually gave up because of the difficulty in handling finalizers.