﻿'From Squeak6.0alpha of 11 May 2022 [latest update: #21739] on 16 June 2022 at 9:52:05 am'!

!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]! !

