Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.320.mcz ==================== Summary ==================== Name: Morphic-ar.320 Author: ar Time: 4 February 2010, 10:47:38.194 pm UUID: cdabac0e-275b-6042-85aa-2198a837dc8a Ancestors: Morphic-cmm.319 Restore execution timeout for deferred ui message processing which was lost in previous change. =============== Diff against Morphic-cmm.319 =============== Item was changed: ----- Method: WorldState>>runStepMethodsIn: (in category 'stepping') ----- runStepMethodsIn: aWorld "Perform periodic activity inbetween event cycles" + | queue msg limit stamp | + "Limit processing of deferredUIMessages to a max. amount of time" + limit := self class deferredExecutionTimeLimit. + stamp := Time millisecondClockValue. - | queue msg | queue := self class deferredUIMessages. + [(Time millisecondsSince: stamp) >= limit + or:[(msg := queue nextOrNil) == nil]] + whileFalse: [msg value]. - [(msg := queue nextOrNil) == nil] whileFalse: [ - msg value. - ]. self runLocalStepMethodsIn: aWorld. ! |
Sorry I lost that. Is the purpose of the execution timeout to allow
other Morphs a chance to step? On Fri, Feb 5, 2010 at 12:48 AM, <[hidden email]> wrote: > Andreas Raab uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-ar.320.mcz > > ==================== Summary ==================== > > Name: Morphic-ar.320 > Author: ar > Time: 4 February 2010, 10:47:38.194 pm > UUID: cdabac0e-275b-6042-85aa-2198a837dc8a > Ancestors: Morphic-cmm.319 > > Restore execution timeout for deferred ui message processing which was lost in previous change. > > =============== Diff against Morphic-cmm.319 =============== > > Item was changed: > ----- Method: WorldState>>runStepMethodsIn: (in category 'stepping') ----- > runStepMethodsIn: aWorld > "Perform periodic activity inbetween event cycles" > + | queue msg limit stamp | > + "Limit processing of deferredUIMessages to a max. amount of time" > + limit := self class deferredExecutionTimeLimit. > + stamp := Time millisecondClockValue. > - | queue msg | > queue := self class deferredUIMessages. > + [(Time millisecondsSince: stamp) >= limit > + or:[(msg := queue nextOrNil) == nil]] > + whileFalse: [msg value]. > - [(msg := queue nextOrNil) == nil] whileFalse: [ > - msg value. > - ]. > self runLocalStepMethodsIn: aWorld. > ! > > > |
Chris Muller wrote:
> Sorry I lost that. Is the purpose of the execution timeout to allow > other Morphs a chance to step? The purpose is to avoid killing the UI if you happen to have a high-priority runaway process, along the lines of: [[true] whileTrue:[World addDeferredUIMessage:[World flash]] forkAt: Processor userInterruptPriority. This will eventually exhaust the queue but you'll get a chance to open a process browser and hopefully be able to kill the runaway process before it's too late. (stepping is not affected since stepping doesn't use the deferred ui queue and is interruptable via cmd-period) Cheers, - Andreas > On Fri, Feb 5, 2010 at 12:48 AM, <[hidden email]> wrote: >> Andreas Raab uploaded a new version of Morphic to project The Trunk: >> http://source.squeak.org/trunk/Morphic-ar.320.mcz >> >> ==================== Summary ==================== >> >> Name: Morphic-ar.320 >> Author: ar >> Time: 4 February 2010, 10:47:38.194 pm >> UUID: cdabac0e-275b-6042-85aa-2198a837dc8a >> Ancestors: Morphic-cmm.319 >> >> Restore execution timeout for deferred ui message processing which was lost in previous change. >> >> =============== Diff against Morphic-cmm.319 =============== >> >> Item was changed: >> ----- Method: WorldState>>runStepMethodsIn: (in category 'stepping') ----- >> runStepMethodsIn: aWorld >> "Perform periodic activity inbetween event cycles" >> + | queue msg limit stamp | >> + "Limit processing of deferredUIMessages to a max. amount of time" >> + limit := self class deferredExecutionTimeLimit. >> + stamp := Time millisecondClockValue. >> - | queue msg | >> queue := self class deferredUIMessages. >> + [(Time millisecondsSince: stamp) >= limit >> + or:[(msg := queue nextOrNil) == nil]] >> + whileFalse: [msg value]. >> - [(msg := queue nextOrNil) == nil] whileFalse: [ >> - msg value. >> - ]. >> self runLocalStepMethodsIn: aWorld. >> ! >> >> >> > > |
Free forum by Nabble | Edit this page |