XForms: Question on Idle Callback and Delta Value

Chip Sutton (chip@cs-net.com)
Tue, 19 Jan 1999 16:48:10 -0500

# To subscribers of the xforms list from "Chip Sutton" <chip@cs-net.com> :

I have a program that implements a browser to display event information.
Event information is sent to the program from another process using an IPC
Message Queue. I am using an idle callback to check to see if there is
anything on the queue for this process. I am using the fl_set_idle_delta
function(long msec)where msec is 1000. My assumption is that assuming no
other events that my idle callback will get invoked approximately once each
second. This is working as I expect.

The one thing I have noticed when using the delta value is when "pushing"
some buttons on the form it occasionally takes about 1 second for the event
to register, but not always. I do not ever see this occasional delay if I
don't set the idle delta value.

Instead of the idle callback I tried fl_add_timeout(1000,callback_name,0) to
perform the queue check once each second. This worked fine and I did not
see the occasional "delay" when pushing form buttons. The one thing I did
notice was that using the idle callback with a idle delta set at 1000 msecs
used quite bit less CPU than the timeout over time. Since many users may be
running this program to view events I am want to use the option that uses
the least CPU.

Can anyone shed any light for me on the difference between these functions
and why I might be seeing this "button delay" when using the idle delta
value.

Thanks,

Chip

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/