<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Hi Chris,</p>
<p><br>
</p>
<p>usually, 'self halt' stops the execution of the current process indeed, as you can try out by typing the following into a workspace and doing it:</p>
<p><br>
</p>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>self halt.</p>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>self inform: 'Hello world'</p>
</div>
</blockquote>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p></p>
<p><br>
</p>
<p>You will see that you need to proceed the debugger window in order to get the Hello World message.</p>
<p><br>
</p>
<p>However, Squeak also supports multiprocessing, and it is possible that any code or tool you are using executes your method each time in a separate process. Here is a simple example of multiprocessing:</p>
<p><br>
</p>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>[self halt] fork.</p>
<p>self inform: 'Hello world'</p>
</div>
</blockquote>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p><br>
</p>
<p>You can see that the debugger opens, but the Hello World message is shown at the same time. This is because the #fork message created a new process that is running parallel to the first process. The halt message then only interrupts this second process.</p>
<p><br>
</p>
<p>I don't know your exact code and tools, but that seems a logical explanation to me. If you use a tool that enforces multiprocessing, you might take a look at the Semaphore class to synchronize the different method executions.</p>
<p><br>
</p>
<p>I hope I understood your issue correctly, have much fun with Squeak!</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Beginners <beginners-bounces@lists.squeakfoundation.org> im Auftrag von mechanic <chrisgame@pobox.com><br>
<b>Gesendet:</b> Sonntag, 20. Oktober 2019 17:10 Uhr<br>
<b>An:</b> beginners@lists.squeakfoundation.org<br>
<b>Betreff:</b> [Newbies] Halt doesn't stop</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Following Squeak + Robots, introducing a 'self halt' statement into a method<br>
definition and expecting the program execution to stop and a debug window to<br>
open. That window opens but the execution of the method continues, so in the<br>
repeating pattern example I end up with three or four small 'pre debug<br>
windows' I think they're called, and the pattern is drawn as it would be<br>
without any such halt statement. Why wouldn't the program stop execution<br>
when the halt statement is reached? That seems to be what the book<br>
describes.<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://forum.world.st/Squeak-Beginners-f107673.html" id="LPlnk975661" previewremoved="true">
http://forum.world.st/Squeak-Beginners-f107673.html</a><br>
_______________________________________________<br>
Beginners mailing list<br>
Beginners@lists.squeakfoundation.org<br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" id="LPlnk481435" previewremoved="true">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>