[POLL] Process>>terminate

Igor Stasenko siguctua at gmail.com
Mon Oct 15 09:40:01 UTC 2007


Hi all,

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.

I just wonder, how many of you wrote #ensure: thinking that it will be
evaluated only during normal execution flow and never when process is
terminated in the middle of execution.

I just had conversation with Goran on IRC, and he was surprised by not
knowing this too.
It needless to say that writing a code which uses #ensure: without
knowing such details could lead to errors which is hard to catch and
reproduce.

I thought that #terminate behavior was just stop process at point
where its currently running and never try to evaluate anything else in
its context.

A terminating in current way could be considered as 'soft terminate'
or gracious terminate. But then we lack of 'hard' or unconditional
terminate, which just stops process without trying to unwind stack.

And the poll question is: how many of you thought that #terminate is
'hard' terminate, not 'soft'. :)

-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list