> # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve
Lamont) :
>
> > When the user wants to quit the program, this routine is invoked:
> >
> > int quitcmd() {
> > [...]
> > do
> > fl_check_only_forms();
> > while(!qf.done);
> > [...]
> > It works, it's simple, and it doesn't hog the CPU.
>
> Hm. I'm not exactly sure how quitcmd() is invoked but the loop
> clearly buzzes.
quitcmd() is called from the callback function for the application's
"Quit" button. It asks the obnoxious "Do you really mean to quit?"
question.
>
> Running `top', at least on my system, I can see the load average
> immediately go up when I run code similar to that given above. It may
> not totally hog the CPU but it definitely sucks cycles.
Yes, it uses a few more cycles. But on my system (SGI, IRIX 6.4) it stays
well under 1% of the CPU, so I didn't worry about it.
> In any case, either method works.
Agreed.
-- the other Steve
-- -- EMail: stephen.langer@nist.gov Phone: (301) 975-5423 -- -- WWW: http://math.nist.gov/mcsd/Staff/SLanger/ Fax: (301) 990-4127 -- -- Mail: Building 820 Room 365; NIST; Gaithersburg, Md 20899-0001 -- _________________________________________________ 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/