<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Guys,<br>
<br>
please see below.<br>
<br>
<br>
On 8/17/23 3:05 PM, Juan Vuletich via Cuis-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:64DE1B37.1010209@cuis.st">Hi
Szabolcs,
<br>
<br>
On 8/15/2023 4:18 PM, Szabolcs Komáromi via Cuis-dev wrote:
<br>
<blockquote type="cite">Hi Juan, Ken,
<br>
<br>
Thanks for the explanation. I'm constantly confused, at least
for the time being, by the dichotomy of Smalltalk's "operating
systemness" and its implementation as an application.
<br>
<br>
If Smalltalk would be an operating system it would be normal to
have multiple GUI-threads. But Smalltalk is an application thus
it is perfectly normal to have only one GUI-thread. If i
understand correctly.
<br>
<br>
I'm currently reading John Maloney's papers about Morphic to
better understand what Morphic is. If I'm correct Morphic at its
core is an abstract idea about a GUI framework that emphasizes
concreteness, liveness, and uniformity.
<br>
<br>
When I asked my question what was in my mind is Apple's struggle
with QuickDraw and the classic Mac OS's basic design what
prohibited preemptive multitasking during the 1990s. I thought
maybe there is something similar about Morphic. A somewhat
better question would have been whether Cuis' Morphic
implementation is inherently not tread safe or every possible
implementation of Morphic wouldn't be be thread safe. But this
is also a silly question if Morphic is an abstract idea.
<br>
<br>
Regards,
<br>
Szabolcs
<br>
</blockquote>
<br>
Smalltalk is a bit like an OS and a bit like an application. The
problem with classic MacOS (and also with Windows and OS/2 at that
time) was that an OS is assumed to have strict separation between
the applications it runs, and this was not entirely true.
<br>
<br>
Cuis can have many "application like" GUIs running at the same
time, but they are not separate applications, as they share the
object memory. They also share the GUI Process. This is where Cuis
is _not_ like an operating system, at least not a conventional
one.
<br>
<br>
It is possible, though, to run various WorldMorph at the same
time. Then each runs in its own GUI Process, and they won't share
state at all. But if you really want strong separation between
Cuis applications, it is best to run each in its own Cuis image.
<br>
<br>
Hope this helps.
<br>
<br>
Cheers,
<br>
</blockquote>
That being said:<br>
<br>
All of these Smalltalk-80 derived implementations, including Cuis, <br>
have a class called <tt>Process</tt>, which in current terminology
is a misnomer.<br>
As Juan pointed out, every object in the virtual machine<br>
including instances of <tt>Process</tt>, shares the same (object)
memory.<br>
Today this form of "process" is called "thread".<br>
<br>
<br>
HTH and Best Regards,<br>
<br>
Gerald<br>
<br>
<br>
<blockquote type="cite" cite="mid:64DE1B37.1010209@cuis.st">
<br>
<blockquote type="cite">On Mon, Aug 14, 2023, at 00:53, Juan
Vuletich wrote:
<br>
<blockquote type="cite">Hi Szabolcs,
<br>
<br>
On 8/13/2023 12:54 PM, Szabolcs Komáromi via Cuis-dev wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I'm reading back through the mailing list to gain some
knowledge. I found this comment from Phil:
<br>
<a class="moz-txt-link-freetext" href="https://lists.cuis.st/mailman/archives/cuis-dev/2021-August/003850.html">https://lists.cuis.st/mailman/archives/cuis-dev/2021-August/003850.html</a>
<br>
<blockquote type="cite">If that is the issue, I think
there's a larger problem to be solved.
<br>
Morphic is inherently not thread safe so you're dealing
with an intractable
<br>
problem (short of re-architecting Morphic.) Other than
marking a morph
<br>
for redraw, anything else touching Morphic from a
background process needs
<br>
to be wrapped in UISupervisor whenUIinSafeState: [].
<br>
<br>
</blockquote>
<br>
What makes Morphic inherently not thread safe? Why the
community didn't addressed this shortcoming when the Morphic
framework was reachitected anyway?
<br>
<br>
Regards,
<br>
Szabolcs
<br>
</blockquote>
<br>
The usual wording would be "single threaded". Morphic is
single threaded, like most (all?) GUI frameworks. You can
google "UI thread" or "GUI thread" and see.
<br>
<br>
Synchronization and data protection between threads (we call
them Processes for historical reasons) as required is the
responsibility of the application programmer, like in any
environment, except maybe functional languages and some other
special kinds.
<br>
<br>
In the mail thread you mention, this was conflated with a
similar issue if stepping messages modified Morphic data
structures. There was only a single Process involved, so it
was about a bug, and not about thread safety. I believe the
bug was fixed.
<br>
<br>
So, I don't think we need to redesign Morphic to make it
"thread safe", although anybody is welcome to experiment if so
inclined. What we do need to keep doing is fixing bugs,
defects and limitations as we face them.
<br>
<br>
Hope this helps.
<br>
-- <br>
Juan Vuletich
<br>
cuis.st
<br>
github.com/jvuletich
<br>
researchgate.net/profile/Juan-Vuletich
<br>
independent.academia.edu/JuanVuletich
<br>
patents.justia.com/inventor/juan-manuel-vuletich
<br>
linkedin.com/in/juan-vuletich-75611b3
<br>
twitter.com/JuanVuletich
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<br>
</body>
</html>