<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
        {mso-style-priority:1;
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Marcel, all</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve sent an updated #terminate Kernel-jar.1476: </p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">- fixed the synchronization between the terminating process and the process that invoked the termination.</p>
<p class="MsoNormal">- added further protection against multiple termination (it makes the code uglier but I can't help it)</p>
<p class="MsoNormal">- improved the comment (it's still too long and insufficient though ;) )</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Warning: When terminating a process from the UI (Workspace) one must take into account that an error during the unwind will freeze the UI (because the UI waits for the completion of the termination) - this is expected but scary :)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you run this in the Workspace:</p>
<p class="MsoNormal">                p := [ [Semaphore new wait] ensure: [1/0] ] fork.</p>
<p class="MsoNormal">And then terminate by hand in the Workspace:</p>
<p class="MsoNormal">                p terminate</p>
<p class="MsoNormal">the UI freezes; after Cmd + . recovery the ZeroDivide pops up as expected.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Better way to terminate p in the Workspace is indeed: </p>
<p class="MsoNormal">                [p terminate] fork</p>
<p class="MsoNormal">The ZeroDivide pops up right away ad both processes terminate after you dismiss the popup window.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(To close the debugger window use Proceed or 'terminate ' from the window menu; Abandon doesn’t work for some reason unrelated to #terminate)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For comparison: in 5.3 the above example ended up as an "Unwind error".</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,</p>
<p class="MsoNormal">Jaromir</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNoSpacing"><span lang="CS">--</span></p>
<p class="MsoNoSpacing"><strong><span style="font-family:"Calibri Light",sans-serif;color:#333333;font-weight:normal">Jaromír Matas</span></strong><span style="font-family:"Calibri Light",sans-serif;color:#555555"><o:p></o:p></span></p>
<p class="MsoNoSpacing"><span style="font-family:"Calibri Light",sans-serif;color:#2E75B6">mail@jaromir.net</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>