<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Szabolcs,<br>
<br>
On 8/13/2023 12:54 PM, Szabolcs Komáromi via Cuis-dev wrote:
<blockquote
cite="mid:9d8289cf-e762-44ed-b8d2-1acc9d36eebc@app.fastmail.com"
type="cite">
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
<div>Hi,<br>
</div>
<div><br>
</div>
<div>I'm reading back <span>through the mailing list to gain some
knowledge. I found this comment from Phil:</span><br>
</div>
<div><a moz-do-not-send="true"
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>
</div>
<blockquote type="cite">
<pre>If that is the issue, I think there's a larger problem to be solved.
Morphic is inherently not thread safe so you're dealing with an intractable
problem (short of re-architecting Morphic.) Other than marking a morph
for redraw, anything else touching Morphic from a background process needs
to be wrapped in UISupervisor whenUIinSafeState: [].
</pre>
</blockquote>
<div><br>
</div>
<div>What makes Morphic inherently not thread safe? Why the
community didn't addressed this shortcoming when the Morphic
framework was reachitected anyway?<br>
</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<div>Szabolcs<br>
</div>
</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>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>