Re: examples/thread_usage.pl



Joe Smith said:
 > muppet <scott asofyet org> wrote:
 >
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...  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.
...

Just a data point: I couldn't find a priority value that didn't peg my
cpu.  Anyone have different results?  I'm probably doing something wrong.

very much the case. the example in cvs has the idle changed to a timeout
running at 200 ms or something like that.

Glib::Timeout->add (250, sub {...});

-rm



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