#fork and deterministic resumption of the resulting process

Michael van der Gulik mikevdg at gmail.com
Tue Feb 5 23:08:07 UTC 2008


On Feb 5, 2008 11:02 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:

> On Feb 5, 2008, at 10:29 , Andreas Raab wrote:
>
> > Paolo Bonzini wrote:
> >> I'm with Terry on the correct idiom to use, i.e.
> >>     workerProcess := [self runWorkerProcess] newProcess.
> >>     workerProcess resume.
> >
> > Sigh. One of the problems with examples is that they are ... well
> > examples. They are not the actual code. The above solution is
> > simply not applicable in our context (if it were, I would agree
> > with it as the better solution).
> >
> > [BTW, I'm gonna drop out of this thread since it's clear that there
> > is too much opposition for such a change to get into Squeak. Which
> > is fine by me - I'll wait until you will get bitten in some really
> > cruel and unusual ways and at that point you might be ready to
> > understand why this fix is valuable. Personally, I think that
> > changes that take out an unusual case of non-determinism like here
> > are always worth it - if behavior is deterministic you can test it
> > and fix it. If it's not you might get lucky a hundred times in a
> > row. And in the one critical situation it will bite you].
>
> Well, you should give us a bit more than a few hours ;) Until now
> most posters did not even understand the proposal.
>
> I for one would appreciate getting your fix in. It does not change
> the current semantics, and makes one very common idiom (var := [...]
> fork) safer to use. There may be better idioms, granted. However, for
> now Squeak's scheduling policy is beautifully deterministic, and I
> like keeping simple things simple.
>


Andreas's original code was buggy and his proposed fix was incorrect.

You should never make any assumptions about the scheduling behaviour of your
environment. It can and will change in the future. Also, it makes your code
less portable across dialects.

Gulik.


-- 
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080206/27e8c57d/attachment.htm


More information about the Squeak-dev mailing list