Author Kjir
Recipients Kjir
Date 2009-04-18.13:53:44
SpamBayes Score 0.0
Marked as misclassified No
Message-id <1240062828.56.0.381280263985.issue5785@psf.upfronthosting.co.za>
In-reply-to
Content
I have an issue with the wait() method of Condition which doesn't seem 
to respect the timeout it is given: I couldn't create a simple example 
to reproduce the bug, because if I try to do something small and simple 
everything works as expected, but in the actual code it doesn't work, 
so here's the link to the code:

http://github.com/Kjir/amsn2/blob/
bda6829d0c7d50a1cbf1188cdfa3789c4b7967c5/amsn2/gui/front_ends/curses/
contact_list.py

The most interesting function is the last one, where there is a wait 
with timeout of 1 second. If I have a look at the logs, after the 
initial download of the list there is nothing happening, while I'd 
expect to see a "check" cycle every second or so. If there is a 
notification arriving, the whole thing fires up and updates the contact 
list as expected, but the timeout itself doesn't work.

I don't know if there could be a problem with other modules, for 
instance gobject, but if there is then you should update the 
documentation to point out such incompatibilities.

If you could help me to create a simpler program to test this issue I 
would happy to provide you a test case, but I am out of ideas right now 
on how to narrow down the issue.

If you want to download the code and test it, here are the instructions:
git clone git://github.com/Kjir/amsn2.git
cd amsn2
git checkout -b curses_cl origin/curs_cl
python amsn2.py -f curses 2>> run.log
Log in with an msn account, tail -f run.log in another terminal to 
watch the logs

If you want to se what happens on a notify, one of your contacts should 
change status.

And here are a very brief explanation on how the code is called, if you 
need it:
the whole code is divided in basically three areas, core, protocol and 
gui. I am working on the gui side and the methods contactListUpdated, 
groupUpdated and contactUpdated are called by the core through a 
gobject signal.

My python version is 2.5.2 on gentoo amd64, use flags:
berkdb gdbm ipv6 ncurses readline ssl threads tk xml
-build -doc -elibc_uclibc -examples -sqlite -ucs2 -wininst

If you need anything else, just ask!

Oh and here's the link to the posts on comp.lang.python:
http://groups.google.com/group/comp.lang.python/browse_thread/
thread/7fc388c30304bf22#
History
Date User Action Args
2009-04-18 13:53:48Kjirsetrecipients: + Kjir
2009-04-18 13:53:48Kjirsetmessageid: <1240062828.56.0.381280263985.issue5785@psf.upfronthosting.co.za>
2009-04-18 13:53:47Kjirlinkissue5785 messages
2009-04-18 13:53:44Kjircreate