[squeak-dev] Re: The Trunk: Kernel-ar.238.mcz
Andreas Raab
andreas.raab at gmx.de
Sun Sep 6 04:57:43 UTC 2009
Michael van der Gulik wrote:
>> - ] ifFalse: [
>> - "Since the receiver is not the active process, drop its priority to
>> rock-bottom so that
>> - it doesn't accidentally preempt the process that is trying to terminate
>> it."
>> - priority := 10.
>
> I admit not fully understanding everything here, but should you
> perhaps have kept the priority drop here? Otherwise, by my
> understanding, the process that is meant to be terminated might be
> restarted in this line here before it gets suspended:
>
>> + myList ifNotNil:[oldList := self suspend].
Good catch, but it isn't necessary. There is no suspension point in the
above line. And dropping the priority isn't safe to begin with. The only
safe thing is atomic suspend. In fact, now that I look at it, I doubt
that there is a need for the myList ifNotNil:[] guard - it looks like a
left-over from the previous (unsafe) version.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|