[squeak-dev] #terminate update
Jaromir Matas
mail at jaromir.net
Tue Jun 7 15:38:30 UTC 2022
Hi Marcel, all
I’ve sent an updated #terminate Kernel-jar.1476:
- fixed the synchronization between the terminating process and the process that invoked the termination.
- added further protection against multiple termination (it makes the code uglier but I can't help it)
- improved the comment (it's still too long and insufficient though ;) )
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 :)
If you run this in the Workspace:
p := [ [Semaphore new wait] ensure: [1/0] ] fork.
And then terminate by hand in the Workspace:
p terminate
the UI freezes; after Cmd + . recovery the ZeroDivide pops up as expected.
Better way to terminate p in the Workspace is indeed:
[p terminate] fork
The ZeroDivide pops up right away ad both processes terminate after you dismiss the popup window.
(To close the debugger window use Proceed or 'terminate ' from the window menu; Abandon doesn’t work for some reason unrelated to #terminate)
For comparison: in 5.3 the above example ended up as an "Unwind error".
Best,
Jaromir
--
Jaromír Matas
mail at jaromir.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220607/b9c99a00/attachment.html>
More information about the Squeak-dev
mailing list
|