goran at krampe.se
Mon Oct 15 10:52:55 UTC 2007
>> I just found a side-effect of Process>>terminate call, leading to
>> evaluate all #ensure: and #ifCurtailed: blocks in process before its
>> really got terminated.
> This is absolutely the right behavior. When I say "ensure", I mean
> "ensure no matter what". This includes deleting the debug window or
> terminating the process some other way. In particular, you want all
> semaphores in critical regions to be unlocked.
Well, I must *personally* say that I always associated #ensure: and
friends with the exception framework - thus, yes, I also want my ensure:
blocks to run - when there are *exceptions* thrown - but also when the
Process is *terminated*? Igor asked me on IRC and I admit I wouldn't have
guessed them to be executed then.
And I presume Igor wants to see how many of us have the "wrong" perception
here - and if we are many - then *that* is in any circumstance a problem.
> Why is this a problem? Perhaps there is a bug in the ensure block,
> and so you don't want to run it. I use ensure blocks to close files,
> and if I kill the process, I still want files to be closed.
I am unsure, but I think Igor noticed some oddish behavior in Magma that
caught his attention to this.
More information about the Squeak-dev