'From Squeak6.0alpha of 2 January 2022 [latest update: #20949] on 7 January 2022 at 9:49:09 pm'!

!Context methodsFor: 'query' stamp: 'jar 1/7/2022 21:44'!
isDone
	"Answer if the receiver has no unexecuted code left."

	self isDead ifTrue: [^true].
	self isBottomContext ifTrue: [^self atEnd].
	(self atEnd or: [self method selector = #suspend]) ifTrue: [^self sender isDone].
	^false! !


!Process methodsFor: 'testing' stamp: 'jar 1/7/2022 21:43'!
isTerminated
	"Answer if the receiver is terminated. A healthy process is considered 
	 terminated if the suspendedContext has no unexecuted code left."

	self isActiveProcess ifTrue: [^ false].
	^suspendedContext isNil or: [suspendedContext isDone]! !

