[BUG] User interrupts no longer interrupt locked UI process

Ned Konz ned at squeakland.org
Thu Mar 18 23:20:32 UTC 2004


On Thursday 18 March 2004 2:02 pm, Andreas Raab wrote:
> Like I said to Tim only a few weeks ago, I think the inputSemaphore will be
> incredibly useful at some point down the road - it existence means you are
> able to do something like:
>
> WorldState>>doOneCycleNow
>     Sensor inputSemaphore waitTimeoutMSecs: nextStepTime.
>
> This means two things: Zero CPU usage unless you do really something (and
> that would mean that your PDA can actually do some serious power cycling)
> and potentially some better responsiveness to UI events.

OK, I added a check for whether the input semaphore is actually working to the 
code I just posted (which fixes the interrupt too).


So we can change the interCyclePause: logic in the WorldState loop to be 
something like:

if Sensor's input semaphore is actually working
	Sensor inputSemaphore waitTimeoutMsecs: (self timeToNextStepOrAlarm)
otherwise
	self interCyclePause: (... 1 or MinCycleLapse ... )

I think I'll try this too.
	
-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list