[squeak-dev] Fwd: [Pharo-project] Another finalization concern: error handling

Igor Stasenko siguctua at gmail.com
Mon Oct 11 15:23:01 UTC 2010


On 11 October 2010 17:34, Schwab,Wilhelm K <bschwab at anest.ufl.edu> wrote:
> Levente,
>
> Ok, but just because the system saves us at the last instant does not mean that we should be going out of our way to multiply free external resources.  Files are well known to the vm; other things (GSL vectors/matrices comes to mind) will not enjoy such protections.  This strikes me as a feature that got added when errors arose from attempts to add redundant executors, ultimately due to lack of thread safety.  Many things that are being fixed at great cost got started (it sure seems) because someone added a feature or placed something in or too near to Object only to avoid errors vs. finding and fixing the real problem.
>
> Maybe you have made a strong argument for multiple executors; if so, I've missed it.  Right now, it looks like a design flaw instead of a feature.
>

I second that. Knowing that VM/OS does the best to not pushish those
who attempting to free already freed resource, doesn't means that we
should be careless about it!

OS tries the best to not give away a same file handle for newly opened
file as recently closed file(s).
malloc() tries the best to not give away the pointer to same memory
region, which was recently freed.
But obviously, a well-designed application should never rely on such behavior.


--
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list