Re: examples/thread_usage.pl



On Sunday, January 11, 2004, at 11:43 AM, Ross McFarland wrote:

have a look. comments/questions/problems let me know.

ok... you use an idle at default priority to update the gui thread's status; in reality, that's very much overkill, unless you need your threads to be very very tightly synchronized. this will leave the main thread nearly pegging the processor.

the two easiest options: give the idle a lower priority (which is a higher number), or use a timeout instead.

in my experience, a timeout at between 100 to 250 milliseconds is quite sufficient for things that merely update a display, because, after all, we humans can't read it if it's not there long enough.

--
"it's hard to be eventful when you have this much style."
   - me, rationalizing yet another night of sitting at home.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]