[Newbies] Halt doesn't stop

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Oct 20 15:33:47 UTC 2019

Hi Chris,

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:

self halt.

self inform: 'Hello world'

You will see that you need to proceed the debugger window in order to get the Hello World message.

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:

[self halt] fork.

self inform: 'Hello world'

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.

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.

I hope I understood your issue correctly, have much fun with Squeak!



Von: Beginners <beginners-bounces at lists.squeakfoundation.org> im Auftrag von mechanic <chrisgame at pobox.com>
Gesendet: Sonntag, 20. Oktober 2019 17:10 Uhr
An: beginners at lists.squeakfoundation.org
Betreff: [Newbies] Halt doesn't stop

Following Squeak + Robots, introducing a 'self halt' statement into a method
definition and expecting the program execution to stop and a debug window to
open. That window opens but the execution of the method continues, so in the
repeating pattern example I end up with three or four small 'pre debug
windows' I think they're called, and the pattern is drawn as it would be
without any such halt statement. Why wouldn't the program stop execution
when the halt statement is reached? That seems to be what the book

Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
Beginners mailing list
Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20191020/a176d0a0/attachment.html>

More information about the Beginners mailing list