Condition.wait(0.5) doesn't respect it's timeout
aahz at pythoncraft.com
Sun Apr 19 17:50:16 CEST 2009
In article <6c04c7da-6b54-4a49-803f-aac3126e38f4 at f19g2000yqh.googlegroups.com>,
<stephane.bisinger at gmail.com> wrote:
>On Apr 18, 8:29=A0pm, Piet van Oostrum <p... at cs.uu.nl> wrote:
>> By the way, I wonder why you need a timeout in your wait. I think the
>> notifications should be sufficient to keep the gui updated.
>The reason is simple: when first downloading the contactss list, I
>receive a swarm of *Updated() calls, so if I redraw every time I get a
>very bad visual effect and I waste a lot of CPU redrawing something
>that will change in a very very short time. Hence the time
>constraint... I couldn't come up with something smarter, so...
The redraw thread should keep track of the last time it did a redraw;
each time it receives an update event, it should check to see whether it
has been more than a specified period of time since the last redraw.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Adair
More information about the Python-list