<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Done, but "<span style="font-family: Calibri, sans-serif;font-size: 14.6667px">ToolsTests-jar.109" is already in Trunk.</span><div><br></div><div>What about "Tests-jar.476"?<div><br></div><div>Best,</div><div>Marcel</div></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 10:35:47 schrieb Jaromir Matas <mail@jaromir.net>:</p><div style='font-family:Arial,Helvetica,sans-serif'>
<div class="WordSection1">
<p class="MsoNormal">Hi Marcel,</p>
<p class="MsoNormal">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:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kernel-jar.1421 (stepOver bug - orig + flags) <o:p></o:p></p>
<p class="MsoNormal">Kernel-jar.1415 (stepOver bug - better) <o:p></o:p></p>
<p class="MsoNormal">Kernel-jar.1399 (exception return - not urgent) <o:p></o:p></p>
<p class="MsoNormal">Kernel-jar.1368 (#priority bug) <o:p></o:p></p>
<p class="MsoNormal">KernelTests-jar.393 (#priority bug - test) <o:p></o:p></p>
<p class="MsoNormal">Tools-jar.1159 (debugger closing bug Christoph) <o:p></o:p></p>
<p class="MsoNormal">ToolsTests-jar.110 (test19&20 - wrong ancestry to 109) <o:p>
</o:p></p>
<p class="MsoNormal">ToolsTests-jar.109 (debugger termination tests 21-24) <o:p></o:p></p>
<p class="MsoNormal">Tests-jar.466 (unwind tests)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The only contributions still relevant are:</p>
<p class="MsoNormal">Kernel-jar.1480 (stepOver bug - latest) </p>
<p class="MsoNormal">Kernel-jar.1445 (#restart - simplify method) </p>
<p class="MsoNormal">KernelTests-jar.418 (#priority bug - expected failure)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Apologies for any inconvenience; I’d like to declutter not to cause any more confusion :)</p>
<p class="MsoNormal">Thanks a lot,</p>
<p class="MsoNormal">jaromir</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:commits@source.squeak.org">commits@source.squeak.org</a><br>
<b>Sent: </b>Tuesday, June 14, 2022 10:30<br>
<b>To: </b><a href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev@lists.squeakfoundation.org</a>;
<a href="mailto:packages@lists.squeakfoundation.org">packages@lists.squeakfoundation.org</a><br>
<b>Subject: </b>[squeak-dev] The Trunk: Tests-jar.466.mcz</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Marcel Taeumel uploaded a new version of Tests to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tests-jar.466.mcz">http://source.squeak.org/trunk/Tests-jar.466.mcz</a><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>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div></blockquote>
                                        </div></body>