> And was certainly fit for purpose, only problem is, as > expected it 'hosed' the CPU ;-> Until I tell it not to run at > full whack then this is going to happen no matter what the > spec of the machine I suppose.
Pegging the CPU to the endstop is seldom an issue, so long as the heavy thread yields often enough to allow everything else to remain responsive. You have the hardware there, and you are pumping electrons through it anyway, so you might as well use it all if that's what it takes to get the job done... That's assuming what you are doing is heavy number crunching, of course. On the other hand, if your calculation only needs to be done at a fixed rate, maybe you should be looking at Fl::add_timeout() to see about running updates via a timer? > I have just told the program > to 'GO' so I think I could afford to cap the framerate (if > that is accessible in FLTK?) a little and reduce CPU that > way, but I think the clear answer is really to go with the > multithreading. Even with multiple threads, if your calculation does not need all the CPU you might want to think about using timers to schedule appropriate updates and recalculation periods... SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

