Berserk idleLoop in event handling?

Tim Rowledge tim at sumeru.stanford.edu
Sat Jan 10 01:52:42 UTC 2004


John M McIntosh <johnmci at smalltalkconsulting.com> wrote:

> Tim, have you looked at doing something in the millisecond clock call?
Not until recently but it will have to go on my list I guess. Platforms
that (ab)use UI polling to run their entire multitasking regime are a
real pain in the neck sometimes!

Don't forget that checkForInterrupts() does attempt to make sure that
ioProcess() is called at least once every 500mS. We could make that
more frequent at some cost in apparent benchmark performance. For
UIequalsOS task switching platforms this is a useful place to ensure at
least some UI polling.

Oddly enough the .h comment about ioProcessEvents() says:-
/* Note: In an event driven architecture, ioProcessEvents is obsolete.
   It can be implemented as a no-op since the image will check for
   events in regular intervals. */
but all four main platforms do actually appear to do event fetching
within it. 

I note that checkForInterrupts is currently involved in a bizarre
pseudo-feedback algorithm relating to interruptCheckCounter et al.
Wouldn't this be better as a platform specific macro or routine? Does
anyone recall the logic behind it?


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Earth is 98% full...please delete anyone you can.



More information about the Squeak-dev mailing list