[squeak-dev] Process #suspend / #resume semantics

mail at jaromir.net mail at jaromir.net
Mon Dec 27 10:48:43 UTC 2021

Hi all,

What is the desirable semantics of resuming a previously suspended process?

#resume's comment says: "Allow the process that the receiver represents to continue. Put the receiver in *line to become the activeProcess*."

The side-effect of this is that a terminating process can get resumed (unless suspendedContext is set to nil - see test KernelTests-jar.417 / Inbox - which has the unfortunate side-effect of #isTerminated answer true during termination).

A similar side-effect: a process originally waiting on a semaphore and then suspended can be resumed into the runnable state and get scheduled, effectively escaping the semaphore wait.

Is this an expected behavior or a bug?

If a bug, should a suspended process somehow remember its previous state and/or queue and return to the same one if resumed?

Sorry if I'm missing something :)

^[^    Jaromir

Sent from Squeak Inbox Talk

More information about the Squeak-dev mailing list