<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;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{mso-style-priority:1;
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
color:black;}
.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" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Juan,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve stumbled upon this irregularity:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you run this in the Workspace…</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[Smalltalk installLowSpaceWatcher] fork.</p>
<p class="MsoNormal">[Smalltalk installLowSpaceWatcher] fork</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">… the system ends up with two processes running the #lowSpaceWatcher method; the root cause is #installLowSpaceWatcher runs unprotected against multiple concurrent invocations.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d suggest running the # installLowSpaceWatcher’s code as the Semaphore >> #critical section: see attached changeset with a more detailed description in the method comment. Please feel free to modify in any way :)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your opinion,</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 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:cuis-dev@lists.cuis.st">Jaromir Matas via Cuis-dev</a><br>
<b>Sent: </b>Wednesday, July 6, 2022 9:29<br>
<b>To: </b><a href="mailto:JuanVuletich@zoho.com">Juan Vuletich</a>; <a href="mailto:cuis-dev@lists.cuis.st">
Discussion of Cuis Smalltalk</a><br>
<b>Cc: </b><a href="mailto:mail@jaromir.net">Jaromir Matas</a><br>
<b>Subject: </b>Re: [Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Juan,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">> It is nice to use Smalltalk as it is meant to be used: a place to experiment, learn and build, and share as we do it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Exactly; Smalltalk is such a wonderful tool for that! Is there any other language / system providing so much flexibility at all? Before Smalltalk I tried Python but gave up, no fun (for me; no offence!) ;D<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">> Doing it as a bunch is much better than by oneself!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So valuable! Feedback, motivation, new angles, fun... thanks to all!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">> I think the logic to pick which process to interrupt may still be improved, we need to figure out how.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is an interesting note; I'll have to think about it :)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks for all your answers and help.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,<o:p></o:p></p>
<p class="MsoNormal">Jaromir<o:p></o:p></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 style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From: </b><a href="mailto:JuanVuletich@zoho.com">Juan Vuletich</a><br>
<b>Sent: </b>Tuesday, July 5, 2022 15:28<br>
<b>To: </b><a href="mailto:cuis-dev@lists.cuis.st">Discussion of Cuis Smalltalk</a><br>
<b>Cc: </b><a href="mailto:mail@jaromir.net">Jaromir Matas</a><br>
<b>Subject: </b>Re: [Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:black">Hi Jaromir,<br>
<br>
On 7/5/2022 7:41 AM, Jaromir Matas via Cuis-dev wrote: <o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:black">Hi Juan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Thank you very much; I learn a lot from your feedback.<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"> <br>
Thank you too. I'm also learning from these exercises. It is nice to use Smalltalk as it is meant to be used: a place to experiment, learn and build, and share as we do it. Doing it as a bunch is much better than by oneself!<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:black">Question: Did you leave your previous update #5347 off from #newProcessIfUI: intentionally or by mistake? The example in the comment now blocks the UI... I'm attaching a simplified version of the previous proposal
just in case... <o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"><br>
My intention was to remove the call to #terminate, as it is now superfluous thanks to your better #mainLoop. I also removed the call to #newUIProcessIfNeeded by mistake. I kind of integrated your change, adding it back.<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:black">but frankly, I barely know what I'm doing... it's so interrelated and I can't foresee possible impact of even a small change, sorry if I missed something.<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"><br>
Since you have started contributing to Cuis, you pushed me a little beyond my comfort zone each time. It is easy to miss some detail! We go, step by step, carefully. As we go, Cuis keeps improving and we keep learning. Thanks for that.<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">One more question: in your previous update #5346 you changed the return value from UIProcess to oldUIProcess: I can't figure out why... in case you have a spare minute :)<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"><br>
The old ui process can be taken "as the one the user tried to interrupt with cmd + .". Answering the new UIProcess was a mistake. In the update I just pushed I added comments and renamed variables in the involved methods, trying to make all this clearer.<br>
<br>
I think the logic to pick which process to interrupt may still be improved, we need to figure out how.<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">> [...] it is no longer possible to have 2 different worlds running in different processes.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">> Well the UIProcess class variable already precludes this. When we work on enabling multiple worlds, each with its own running process, we'll see.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">yes, that's what I thought... no harm done at the moment; later, each world might need to have it's own "UIProcess" variable.<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"><br>
Exactly!<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:black">Thanks again,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">best,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Jaromir<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black"><br>
Cheers,<o:p></o:p></span></p>
<pre>-- </pre>
<pre>Juan Vuletich</pre>
<pre><a href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a></pre>
<pre><a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a></pre>
<pre><a href="https://github.com/jvuletich">https://github.com/jvuletich</a></pre>
<pre><a href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a></pre>
<pre><a href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a></pre>
<pre><a href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a></pre>
<pre><a href="https://patents.justia.com/inventor/juan-manuel-vuletich">https://patents.justia.com/inventor/juan-manuel-vuletich</a></pre>
<pre><a href="https://twitter.com/JuanVuletich">https://twitter.com/JuanVuletich</a></pre>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>