[squeak-dev] Files | #startUp and #shutDown in FileDirectory

Marcel Taeumel marcel.taeumel at hpi.de
Thu May 28 13:42:11 UTC 2020


Hi Dave!

Thanks. :-)

Considering a bigger but similar, maybe FFI-based, mechanism, do you think it makes sense to clean up such things on a fresh startup only instead of every snapshot? Think of flushing the entire GPU-state you are currently managing just to retain some other in-image object. Seems overkill.

What's the underlying best practice? :-)

Best,
Marcel
Am 28.05.2020 15:26:09 schrieb David T. Lewis <lewis at mail.msen.com>:
On Wed, May 27, 2020 at 08:58:48AM +0200, Marcel Taeumel wrote:
> Hi, there. :-)
>
> Why do we reset file-related stuff (e.g. source file handles, default directory class)?? on every snapshot? Shouldn't there be a check for "resuming" (or "quitting") in FileDirectory class >> #startUp(:) (and #shutDown(:))?
>
> ...or am I missing something? Tim (tpr)! You started it in 2003. Please, explain.??:-D
>
> Maybe ... we don't ever want to store dangling source-file handles in the image?
>

Yes I think that is the reason. The image snapshot should contain little or
no platform-specific stuff, and there is no point in allowing it to contain
obsolete file handles that would need to be detected by primitive fallback
code when the snapshot is next loaded.

After all, the image that you snapshot today may next be opened by someone
with a Risc OS computer :-)

Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200528/0130a1dc/attachment.html>


More information about the Squeak-dev mailing list