Berserk idleLoop in event handling?
Tim Rowledge
tim at sumeru.stanford.edu
Fri Jan 9 02:04:01 UTC 2004
In message <aee5d26d4c.rowledge at Gravious.comcast.net>
Tim Rowledge <tim at sumeru.stanford.edu> wrote:
> The ioProcessLoop runs too many times if the VM signals the inputSemaphore
> for each event, since it runs to empty the vm queue for each signal. On
> platforms where calling the next event prim has to poll the OS for new
> events that can cost a good deal of time. Either we should call
> primGetNextEvent once per signal or we should flush the signals in the
> ioProcessLoop. Or fudge the vm to only signal once for each batch of
> events?
Whoops, forgot the vm code that only does the actual OS polling if the
event queue is empty. Still a time waster though.
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
"How many Slavers does it take to change a lightbulb?" "Dunno. How
susceptible are lightbulbs to telepathy?"
More information about the Squeak-dev
mailing list
|