[squeak-dev] New #suspend semantics

Jaromir Matas mail at jaromir.net
Mon Jun 13 06:45:49 UTC 2022

Hi Christoph,

The difference between the new #suspend using suspend primitive 578 and the previous one using primitive 88 is this:

Previously, if you suspended a process waiting on a semaphore or mutex the process was removed from the semaphore or mutex; subsequent #resume would let the process continue as if the process had never been waiting.

The new suspend with primitive 578 not only removes the process from the semaphore or mutex but backs it up one instruction, i.e. before the wait send, and thus a subsequent #resume will allow the process go back to the wait on the semaphore or mutex, i.e. to the same state as before the suspension.

One of the adverse effects of the previous behavior was #critical sections could have been entered multiple times regardless of the ownership of the condition variable.

The previous behavior have been used (or misused) to cheaply escape a condition variable; for backward compatibility the old behavior has been preserved in #suspendAndUnblock.

Here's more: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217831.html

Alas, I don't seem to be able to squeeze it into one sentence or even less ;)



Jaromír Matas

mail at jaromir.net

From: christoph.thiede at student.hpi.uni-potsdam.de<mailto:christoph.thiede at student.hpi.uni-potsdam.de>
Sent: Sunday, June 12, 2022 21:45
To: squeak-dev at lists.squeakfoundation.org<mailto:squeak-dev at lists.squeakfoundation.org>
Subject: [squeak-dev] New #suspend semantics

Hi Jaromír,

as I'm currently updating the release notes, I'm trying to figure out what exactly are the visible effects of your changes to #suspend and #suspendAndUnblock from May 30.

There has been written so much about this on the list in the last months that it's hard to follow up. If you could just describe the changes very briefly, probably in one or a half sentence, that would be perfect. :D

Thanks in advance,

Sent from Squeak Inbox Talk<https://github.com/hpi-swa-lab/squeak-inbox-talk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220613/e0390992/attachment.html>

More information about the Squeak-dev mailing list