|
In your case what happens it that the suspendedContext is dead. Now when a suspended context is dead, does that mean the Process is terminated ? I guess so because it cannot be restarted (Now I'm not expert in Process management).
Therefore I think the correct code should be:
isTerminated self isActiveProcess ifTrue: [^ false]. ^ suspendedContext isNil or: [ suspendedContext isBottomContext and: [ suspendedContext isDead not and: [ suspendedContext pc > suspendedContext startpc ] ] ]
Basically it is the same but a little bit clearer to me.
And I do not like: suspendedContext pc ifNotNil: [suspendedContext pc > suspendedContext startpc] because if suspendedContext pc is nil, then the resulting executing code would be: suspendedContext isBottomContext and: [ nil ] and this will result in other problems one day or the other, because this code returns nil instead of true.
|
|
|
Priority: 3 – Must Fix
|
|
Status: Resolved (Fix Review Needed)
|
|
Assigned to: Philippe Back
|
|
Milestone: Pharo2.0
|
Go to Case
|
|