[Cuis-dev] Changes to unwind logic and termination

Jaromir Matas mail at jaromir.net
Sun Nov 9 12:34:09 PST 2025


Hi Juan,

Recently I've done some cleanup/fixing in Squeak and thought you might
want to take a look and perhaps integrate to Cuis. Some of the changes
are already part of the Squeak Trunk, the rest waiting to be merged.

The changes are in the following areas:

1) ContextPart return & resume suite of methods - all simplified and
redirected straight to the unified #unwindAndResume:evaluating: method;
removing some now obsolete (#return:through: and #resume:through:) -
please let me know whether you prefer to go via deprecation like Squeak
or delete them right away (they should not really have been used as
public anywhere, their only purpose was to serve to
#aboutToReturn:through:). No change in functionality, just improved readability.

2) slightly simplified #terminate and #runUntilReturnFrom:

3) the unwind control logic around #ensure:/#ifCurtailed: enriched by an
additional value to track the completion status of the unwinding -> see
#unwindAndResume:evaluating:, #unwindTo:safely:, and
#finishIncompleteUnwindsUpTo: (The reason for this change is a
suspension point on the backward branch of the unwind loop which was
observed to cause termination failures under heavy multithreaded load by Christoph).

4) *finally* really cleanly fixing the "step-over bug" - see
Process>>complete - and reverting #return:from:

5) fixing a little bug hiding in #runUntilErrorOrReturnFrom:

6) reworked many comments

I'd be very thankful if you could review the changes and let me know if
you spot anything suspicious; tests are green in both Cuis and Squeak.

I look forward to your feedback.

best,
Jaromir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7682-CuisCore-jar-2025Nov04-22h53m-jar.001.cs.st
Type: application/octet-stream
Size: 22358 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251109/b2aa73ea/attachment-0001.obj>


More information about the Cuis-dev mailing list