[FIX] WorldState>>runStepMethodsIn:

stefan kersten steve at k-hornz.de
Thu Jan 23 16:14:08 UTC 2003


from the changeset's preamble:

When sending WorldState>>addDeferredUIMessage: with a certain frequency
from a higher-priority process, WorldState>>runStepMethodsIn: blocks
because the queue never empties.

This changeset fixes the problem by dispatching only a fixed amount of
messages per UI cycle.

<sk>

-------------- next part --------------
'From Squeak3.4alpha of ''11 November 2002'' [latest update: #5125] on 23 January 2003 at 4:57:07 pm'!
"Change Set:		WorldState-UIMessages-fix-sk
Date:			23 January 2003
Author:			sk <steve at k-hornz.de>

When sending WorldState>>addDeferredUIMessage: with a certain frequency from a higher-priority process, WorldState>>runStepMethodsIn: blocks because the queue never empties.

This changeset fixes the problem by dispatching only a fixed amount of messages per UI cycle."!


!WorldState methodsFor: 'stepping' stamp: 'sk 1/23/2003 16:37'!
runStepMethodsIn: aWorld
	"Perform periodic activity inbetween event cycles"
	| queue |

	queue _ self class deferredUIMessages.
	queue size timesRepeat: [
		queue next value
	].
	self runLocalStepMethodsIn: aWorld.

	"we are using a normal #step for these now"
	"aWorld allLowerWorldsDo: [ :each | each runLocalStepMethods ]."
! !


More information about the Squeak-dev mailing list