[FIX] WorldState>>runStepMethodsIn: (update)

stefan kersten steve at k-hornz.de
Sun Jan 26 17:40:24 UTC 2003


lex,

Lex Spoon wrote:
> It is excellent to see Morphic getting more robust against imperfect
> morphs.  My heart sinks every time some student does something obvious
> and ends up with a hung system.

it's making the system more robust _and_ improving documentation :)

> I misread your solution at first!  What it is doing is only running
> messages that were there when the method is called.  You did *not* just
> pick some arbitrary number like 100 and only run the first 100 defered
> messages that are there, which I was about to flame about.  :)

i had a second look and tested some more:

the changeset i posted doesn't really fix the problem, because the
message queue is growing as needed, so when sending high-density streams
of messages to the UI, it still hangs as soon as it gets a chance to
run, since the deferred message dispatcher dispatches _all_ available
queue items.

the "right" solution IMHO would be to impose a worstcase bound on the
dispatching process as a whole in terms of execution time (assuming the
respective deferred items execute fast); updated changeset attached ...

btw. my problem was sending to the transcript from a high priority
scheduler approx. every 10 milliseconds. not a wise move, i know, but
when the UI locked, i thought the problem was in my scheduler code.

with the attached changeset i at least get a chance to stop the
scheduler and flush the message queue :)

<sk>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: WorldState-UIMessages-fix-sk.2.cs.gz
Type: application/octet-stream
Size: 772 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030126/d99097cb/WorldState-UIMessages-fix-sk.2.cs.obj


More information about the Squeak-dev mailing list