[squeak-dev] GUI threads (was: Replacing or enhancing or supplementing Morphic)

Jecel Assumpcao Jr jecel at merlintec.com
Wed Mar 1 18:00:22 UTC 2023


David T. Lewis wrote on Tue, 28 Feb 2023 20:39:54 -0500
> In MVC, each Controller has its own Process, and those processes are
> scheduled when needed as windows are activated. In Morphic, there is
> a single UI process.

True, but misleading. Just like the VM has a single OS thread that it
multiplexes between image level processes, the single Morphic thread
pretends to run each morph in parallel at a known rate by repeated
sending #step to them.

Because we know that only when #step for one morph is finished that
#step will be sent to the next morph, we have been programming as it
morphs did not execute in parallel even though that is what the model
was supposed to be. That is why we get in trouble when things happen
outside of the GUI scheduler.

In Self you have have more than one Morphic window and each gets its own
GUI thread, but they are unlikely to share the same objects so we don't
notice the problem. You can also have multiple windows in different
machines viewing the same "world" and in that case they all share a
single GUI thread.

-- Jecel


More information about the Squeak-dev mailing list