[squeak-dev] The Inbox: Kernel-jar.1376.mcz

Jaromir Matas m at jaromir.net
Tue Mar 2 08:06:58 UTC 2021


Hi Eliot,

To clarify some confusion in my last message I tested your idea: it works as
expected for an active process termination. In case of suspended process
termination the suspendedContext is actually not the one of
Process>>terminate so it doesn't do anything except the debugger doesn't
like it and gets stuck before sending #bottomContext following the
terminationStatus assignment (weird).

I also had to change the isTerminated condition because the context becomes
bottom one step after assigning the terminationStatus (all tests are green
but...):


isTerminated
	"Answer if the receiver is terminated, or at least terminating.
	If an active process has terminated, it means it was suspended inside the
        #terminate method and this situation needs to be caught separately.
	If the suspendedContext is the bottomContext and the pc is at the endPC, 
	then there is nothing more to do."

	self isActiveProcess ifTrue: [^false].
	^suspendedContext isNil
	or: [suspendedContext pc isNil]
	or: [suspendedContext methodClass == Process
		and: [suspendedContext selector == #terminate
		and: [(suspendedContext tempAt: 1) == #terminated]]]
	or: [suspendedContext isBottomContext 
		and: [suspendedContext pc >= suspendedContext endPC]]


Thanks,



-----
^[^ Jaromir
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list