<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Jaromir --<div><br></div><div>Tests 23 and 24 do not pass. If they would pass, that would be an error since they are marked as "expected failures". The count "unexpected passes" is for that situation.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 14.06.2022 11:32:04 schrieb Jaromir Matas <mail@jaromir.net>:</p><div style='font-family:Arial,Helvetica,sans-serif'>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:black">ToolsTests-jar.109 – I’d leave it because they pass now and I know I still have to take a closer look at them (23 & 24 as expected failures is a reminder for me; they should work but something’s wrong with the
 design of the tests).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Tests-jar.476 – the test is valid, it’s working and is already in Trunk. I just noticed it still sits in the Inbox at the same time, no idea how come.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Otherwise all my clutter is gone, thanks a lot!</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:marcel.taeumel@hpi.de">Marcel Taeumel</a><br>
<b>Sent: </b>Tuesday, June 14, 2022 11:20<br>
<b>To: </b><a href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev</a><br>
<b>Subject: </b>Re: [squeak-dev] The Trunk: Tests-jar.466.mcz</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Done, but "</span><span style="color:black">ToolsTests-jar.109" is already in Trunk.</span><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">What about "Tests-jar.476"?<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Best,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Marcel<o:p></o:p></span></p>
</div>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 8.0pt;margin-left:0in;margin-top:15.0pt;margin-bottom:5.0pt">
<p style="margin-top:7.5pt"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: #AAAAAA">Am 14.06.2022 10:35:47 schrieb Jaromir Matas <mail@jaromir.net>:<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Hi Marcel,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">I’m afraid this version is already outdated; I’ve sent you a mail “Inbox cleanup” with a list of my Inbox
 stuff that can go to Treated:<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Kernel-jar.1421 (stepOver bug - orig + flags)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Kernel-jar.1415 (stepOver bug - better)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Kernel-jar.1399 (exception return - not urgent)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Kernel-jar.1368 (#priority bug)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">KernelTests-jar.393 (#priority bug - test)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Tools-jar.1159 (debugger closing bug Christoph)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">ToolsTests-jar.110 (test19&20 - wrong ancestry to 109)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">ToolsTests-jar.109 (debugger termination tests 21-24)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Tests-jar.466 (unwind tests)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">The only contributions still relevant are:<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Kernel-jar.1480 (stepOver bug - latest)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Kernel-jar.1445 (#restart - simplify method)
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">KernelTests-jar.418 (#priority bug - expected failure)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Apologies for any inconvenience; I’d like to declutter not to cause any more confusion :)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Thanks a lot,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">jaromir<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">From:
</span></b><a href="mailto:commits@source.squeak.org"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif">commits@source.squeak.org</span></a><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><br>
<b>Sent: </b>Tuesday, June 14, 2022 10:30<br>
<b>To: </b></span><a href="mailto:squeak-dev@lists.squeakfoundation.org"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif">squeak-dev@lists.squeakfoundation.org</span></a><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">;
</span><a href="mailto:packages@lists.squeakfoundation.org"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif">packages@lists.squeakfoundation.org</span></a><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><br>
<b>Subject: </b>[squeak-dev] The Trunk: Tests-jar.466.mcz<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black">Marcel Taeumel uploaded a new version of Tests to project The Trunk:<br>
</span><a href="http://source.squeak.org/trunk/Tests-jar.466.mcz"><span style="font-size: 10.0pt;font-family: "Arial",sans-serif">http://source.squeak.org/trunk/Tests-jar.466.mcz</span></a><span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tests-jar.466<br>
Author: jar<br>
Time: 31 May 2021, 11:29:34.089017 pm<br>
UUID: 3f2953a1-9d10-a044-88af-c9019346c388<br>
Ancestors: Tests-jar.463<br>
<br>
Add a set of tests for nested unwind semantics during termination. Complement latest #terminate in the Inbox.<br>
<br>
Supersede Tests-jar.465 - add a small improvement - terminate from a helper process<br>
<br>
=============== Diff against Tests-jar.463 ===============<br>
<br>
Item was added:<br>
+ TestCase subclass: #ProcessTerminateUnwindTests<br>
+        instanceVariableNames: ''<br>
+        classVariableNames: ''<br>
+        poolDictionaries: ''<br>
+        category: 'Tests-Exceptions'!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminateEnsureAsTopContext (in category 'tests') -----<br>
+ testTerminateEnsureAsTopContext<br>
+        "Test #ensure unwind block is executed even when #ensure context is on stack's top."<br>
+ <br>
+        | p1 p2 p3 x1 x2 x3 |<br>
+        x1 := x2 := x3 := false.<br>
+        <br>
+        "p1 is at the beginning of the ensure block and the unwind block hasn't run yet"<br>
+        p1 := Process<br>
+                forBlock: [[] ensure: [x1 := x1 not]]<br>
+                runUntil: [:ctx | ctx isUnwindContext and: [(ctx tempAt: 2) isNil]].<br>
+ <br>
+        "p2 has already set complete to true (tempAt: 2) but the unwind block hasn't run yet"<br>
+        p2 := Process<br>
+                forBlock: [[] ensure: [x2 := x2 not]]<br>
+                runUntil: [:ctx | ctx isUnwindContext and: [(ctx tempAt: 2) notNil]].<br>
+ <br>
+        "p3 has already set complete to true AND the unwind block has run already run;<br>
+        we have to verify the unwind block is not executed again during termination"<br>
+        p3 := Process<br>
+                forBlock: [[] ensure: [x3 := x3 not]]<br>
+                runUntil: [:ctx | ctx isUnwindContext and: [ctx willReturn]].<br>
+ <br>
+        "make sure all processes are running and only the p3's unwind block has finished"<br>
+        self deny: p1 isTerminated | p2 isTerminated | p3 isTerminated.<br>
+        self deny: x1 | x2.<br>
+        self assert: x3. "p3 has already run its unwind block; we test it won't run it again"<br>
+        "terminate all processes and verify all unwind blocks have finished correctly"<br>
+        p1 terminate. p2 terminate. p3 terminate.<br>
+        self assert: p1 isTerminated & p2 isTerminated & p3 isTerminated.<br>
+        self assert: x1 & x2 & x3!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind1 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind1<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor activeProcess suspend] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind2 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind2<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [ ] ensure: [<br>
+                                                Processor activeProcess suspend.
<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind3 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind3<br>
+        "Terminate runnable process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor yield] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is runnable and none of the unwind blocks has finished yet"<br>
+        self assert: p isRunnable.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind4 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind4<br>
+        "Terminate runnable process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [ ] ensure: [<br>
+                                                Processor yield. <br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isRunnable.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind5 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind5<br>
+        "Terminate active process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor activeProcess terminate] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p suspended itself and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now let the termination continue and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind6 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind6<br>
+        "Terminate active process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [ ] ensure: [<br>
+                                                Processor activeProcess terminate.<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p suspended itself and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now let the termination continue and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind7 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind7<br>
+        "Terminate blocked process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 semaphore |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        semaphore := Semaphore new.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [semaphore wait] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is runnable and none of the unwind blocks has finished yet"<br>
+        self assert: p isBlocked.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwind8 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwind8<br>
+        "Terminate blocked process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 semaphore |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        semaphore := Semaphore new.<br>
+        p := <br>
+                [<br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [ ] ensure: [<br>
+                                                semaphore wait.<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is runnable and none of the unwind blocks has finished yet"<br>
+        self assert: p isBlocked.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn1 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn1<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor activeProcess suspend] ensure: [<br>
+                                                x1 := true. return value]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x3.<br>
+        self deny: x2 & x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn2 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn2<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [] ensure: [<br>
+                                                Processor activeProcess suspend.<br>
+                                                x1 := true. return value]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x3.<br>
+        self deny: x2 & x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn3 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn3<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor activeProcess suspend] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true. return value]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn4 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn4<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [] ensure: [<br>
+                                                Processor activeProcess suspend.<br>
+                                                x1 := true]. <br>
+                                        x2 := true. return value]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn5 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn5<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor activeProcess suspend] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true. return value].<br>
+                        x4 := true.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn6 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn6<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [] ensure: [<br>
+                                                Processor activeProcess suspend.<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true. return value].<br>
+                        x4 := true.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn7 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn7<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [Processor activeProcess suspend] ensure: [<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true. return value.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
Item was added:<br>
+ ----- Method: ProcessTerminateUnwindTests>>testTerminationDuringNestedUnwindWithReturn8 (in category 'tests') -----<br>
+ testTerminationDuringNestedUnwindWithReturn8<br>
+        "Terminate suspended process.<br>
+        Test all nested unwind blocks are correctly unwound; <br>
+        all unwind blocks halfway through their execution should be completed."<br>
+ <br>
+        | p x1 x2 x3 x4 |<br>
+        x1 := x2 := x3 := x4 := false.<br>
+        p := <br>
+        [<br>
+                [:return | <br>
+                        [<br>
+                                [ ] ensure: [<br>
+                                        [] ensure: [<br>
+                                                Processor activeProcess suspend.<br>
+                                                x1 := true]. <br>
+                                        x2 := true]<br>
+                        ] ensure: [<br>
+                                x3 := true].<br>
+                        x4 := true. return value.<br>
+                ] valueWithExit<br>
+        ] newProcess.<br>
+        p resume.<br>
+        Processor yield.<br>
+        "make sure p is suspended and none of the unwind blocks has finished yet"<br>
+        self assert: p isSuspended.<br>
+        self deny: x1 | x2 | x3 | x4.<br>
+        "now terminate the process and make sure all unwind blocks have finished"<br>
+        [p terminate] forkAt: Processor activePriority + 1.<br>
+        self assert: p isTerminated.<br>
+        self assert: x1 & x2 & x3.<br>
+        self deny: x4.!<br>
<br>
<br>
<o:p></o:p></span></p>
</div>
</div>
</blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-right:.5in;mso-margin-bottom-alt:auto">
<span style="font-size: 10.0pt;font-family: "Arial",sans-serif;color: black"> <o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div></blockquote>
                                        </div></body>