[Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.
Jaromir Matas
mail at jaromir.net
Sat Jul 9 04:17:40 PDT 2022
Hi Juan,
I’ve stumbled upon this irregularity:
If you run this in the Workspace…
[Smalltalk installLowSpaceWatcher] fork.
[Smalltalk installLowSpaceWatcher] fork
… the system ends up with two processes running the #lowSpaceWatcher method; the root cause is #installLowSpaceWatcher runs unprotected against multiple concurrent invocations.
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 :)
Thanks for your opinion,
Jaromir
--
Jaromír Matas
mail at jaromir.net
From: Jaromir Matas via Cuis-dev<mailto:cuis-dev at lists.cuis.st>
Sent: Wednesday, July 6, 2022 9:29
To: Juan Vuletich<mailto:JuanVuletich at zoho.com>; Discussion of Cuis Smalltalk<mailto:cuis-dev at lists.cuis.st>
Cc: Jaromir Matas<mailto:mail at jaromir.net>
Subject: Re: [Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.
Hi Juan,
> 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.
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
> Doing it as a bunch is much better than by oneself!
So valuable! Feedback, motivation, new angles, fun... thanks to all!
> I think the logic to pick which process to interrupt may still be improved, we need to figure out how.
This is an interesting note; I'll have to think about it :)
Many thanks for all your answers and help.
Best,
Jaromir
--
Jaromír Matas
mail at jaromir.net
From: Juan Vuletich<mailto:JuanVuletich at zoho.com>
Sent: Tuesday, July 5, 2022 15:28
To: Discussion of Cuis Smalltalk<mailto:cuis-dev at lists.cuis.st>
Cc: Jaromir Matas<mailto:mail at jaromir.net>
Subject: Re: [Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.
Hi Jaromir,
On 7/5/2022 7:41 AM, Jaromir Matas via Cuis-dev wrote:
Hi Juan,
Thank you very much; I learn a lot from your feedback.
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!
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...
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.
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.
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.
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 :)
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.
I think the logic to pick which process to interrupt may still be improved, we need to figure out how.
> [...] it is no longer possible to have 2 different worlds running in different processes.
> Well the UIProcess class variable already precludes this. When we work on enabling multiple worlds, each with its own running process, we'll see.
yes, that's what I thought... no harm done at the moment; later, each world might need to have it's own "UIProcess" variable.
Exactly!
Thanks again,
best,
Jaromir
Cheers,
--
Juan Vuletich
www.cuis-smalltalk.org<http://www.cuis-smalltalk.org>
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220709/bbac9911/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5352-CuisCore-JaromirMatas-2022Jul05-11h10m-jar.001.cs.st
Type: application/octet-stream
Size: 2690 bytes
Desc: 5352-CuisCore-JaromirMatas-2022Jul05-11h10m-jar.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220709/bbac9911/attachment-0001.obj>
More information about the Cuis-dev
mailing list