Multi-thread Question in Morph?

ducasse ducasse at iam.unibe.ch
Sun Feb 1 09:27:36 UTC 2004


What I do not really understand is why if I fork an inspect still the 
system get blocked.

- opening an inspector in another block (self inspect fork) and in this 
new inspector doing self diamNumber still freezes the system

Because this would solve my problem.



On 1 févr. 04, at 00:07, Lex Spoon wrote:

> ducasse <ducasse at iam.unibe.ch> wrote:
>> Yes I see that :). Naively I was thinking that Morphic was more
>> concurrent.
>
> I haven't followed the ins and outs, but please notice that Morphic
> *intentionally* will not call a #step method that is already executing.
> It waits until the previous execution to finish before calling the next
> one.
>
> It used to not do this, and if your #step raised an error then you 
> could
> get cascading pre-debug windows popping up on your screen.
> Additionally, a major advantage to using #step is that you do not need
> to handle any synhcronization, because you know that everything is
> sitting still while you execute.  If step was to become reentrant then
> this would no longer be true.
>
> So, it would be more Morphic-friendly to find some way to set aside a
> blocked pseudo-process.  If one of your bots tries to dereference a
> promise that is not yet fulfilled, then suspend that bot somehow, and
> arrange for it to wake back up when the promise is  fulfilled.

The fun part of it is that I'm doing that do avoid to break morphic by 
having World doOneCycle

Stef

>
>
> -Lex
>




More information about the Squeak-dev mailing list