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

Jaromir Matas m at jaromir.net
Tue Mar 2 13:54:35 UTC 2021


For consideration:

isSuspended
	"A process is suspended if it has been suspended with the suspend
primitive.
	It is distinguishable from the active process and a terminated process by
	having a non-nil suspendedContext that is either not the bottom context
	or has not reached its endPC."
	^myList isNil
		and: [suspendedContext notNil
		and: [self isTerminated not]]

>>> new suggested comment:

	"A process is suspended if it has non-nil suspended context (i.e. is new or 
	previously suspended with the suspend primitive), is not terminated and
	not waiting in a queue (Processor or Semaphore/Mutex/etc., i.e. is not
	runnable or blocked)."


The current #isSuspended suffers from the same inconsistency, i.e. answers
true even after sending terminate (in rare cases). The fix is either modify
the current condition mirroring the changes in #isTerminated or rephrase it
using #isTerminated. I'd prefer the latter but I can't foresee all
consequences. Advice welcome :)

regards,




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


More information about the Squeak-dev mailing list