|
Hi all,
I have been having a threading problem with using many timers in my GUI Tool. My GUI Tool is a kind of tweaking tool which is created for tuning application/game. For the development purpose, This tool (let's call it tweaking tool) is also designed to have multiple small windows for monitoring varibales, and each window has it's own refresh rate (that is the reason mutilple timers are used). The time that needs to request data (from sending packet to receive packet) is at least 50 msec. (sometime 16 msec if there is only one variable added). The problem is if I have a lot of (3 or more) monitor windows opens with 16 msec refresh rate (16 msec?! yes it is requirement), and there are some variables (50 or more) added into their own monitor windows. The tweaking tool's GUI compoments will freeze when I click on somewhere else to activate other control (such as open a new doc, or create another new monitor window), however, the timers are still running (I meant entire tool application is still running) I suspect that it might be caused by the priority of timers have higher priority than GUI componets, therefore, and the event queue has been "stuck" with too many timer's tick event. As a result, GUI components never get a chance to repaint.
I wonder if there any way to lower the timer priority or higher GUI component priority so that the tool will not freeze. Or other solution that can archieve mutiple monitor windows with high refresh rate?! (or fate refresh rate but at least not freese the applicaton)
Any idea would be very much appreciated! Thank you so much!
Nelson |