Ahh?
so if next wakeup tick is less than 16ms then call aioPoll(0) then nanosleep for upto 16ms ish then call aioPoll(0) mmm I guess that services any interrupt that woke things up. and if greater than 16ms you end up sleeping in select() via callling aioPoll(waitfor).
mind I didn't look to see what handleEvents() does... Perhaps you never sleep?
Any chance you could fold the nanosleep back into the aioPoll() logic instead of making it a special case outside of select logic in aioPoll()
On 17-Apr-06, at 3:21 PM, Ian Piumarta wrote:
On Apr 17, 2006, at 3:08 PM, John M McIntosh wrote:
So is aioPoll() ever called with a non-zero value?
Yes. The line after the code you quoted is
dpy->ioRelinquishProcessorForMicroseconds(ms*1000);
which defers to the active display driver. When the display is X11 (for example), the above calls
static sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds) { aioPoll(handleEvents() ? 0 : microSeconds); return 0; }
in sqUnixX11.c.
Cheers, Ian
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===