threading.py Condition wait overflow error

M

Mark English

Every once in a while since I moved to Python 2.4 I've been seeing the
following exception in threading.py Condition:

File "mctest3.py", line 1598, in WaitForMessages
self.condResponses.wait(1.0)
File "C:\Program Files\Python24\lib\threading.py", line 221, in wait
delay = min(delay * 2, remaining, .05)
OverflowError: long int too large to convert to int

Is there something I'm doing wrong here ? I've looked at my code, and
glanced at threading.py, and I can't see any obvious errors (multiplying
a float by 2, using the result of the time.time() call none of which use
longs as far as I know).

I added some print statements to threading.py and the exception is
thrown on the first iteration when delay is 0.0005 and remaining is 1.0
However the code does keep running...
---------<code>--------------
Delay: 0.0005 Remaining: 1.0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "mctest3.py", line 2665, in getLogonResponse
respLogon.WaitForMessages()
File "mctest3.py", line 1598, in WaitForMessages
self.condResponses.wait(1.0)
File "C:\Program Files\Python24\lib\threading.py", line 222, in wait
delay = min(delay * 2, remaining, .05)
OverflowError: long int too large to convert to int
Delay: 0.016 Remaining: 8.07899999619
Delay: 0.032 Remaining: 8.01600003242
Delay: 0.05 Remaining: 7.95399999619
Done
Message response handler got message <LogonStatus4 object at 0x0167B540>
----------</code>-------------

Is this something to do with min ? Converting 1.0 ?

Thanks for any help.

Mark


-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely
for the intended addressee(s). Unauthorised reproduction, disclosure,
modification, and/or distribution of this email may be unlawful. If you
have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary companies.
-----------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top