Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > threading.py Condition wait overflow error

Reply
Thread Tools

threading.py Condition wait overflow error

 
 
Mark English
Guest
Posts: n/a
 
      01-25-2005
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.
-----------------------------------------------------------------------

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Condition.wait(timeout) oddities Floris Bruynooghe Python 1 05-23-2011 05:32 PM
Help with while condition OR condition Bill W. Ruby 13 05-09-2011 09:42 PM
no return value for threading.Condition.wait(timeout)? Gabriel Rossetti Python 11 07-17-2009 08:59 PM
Condition.wait(0.5) doesn't respect it's timeout stephane.bisinger@gmail.com Python 18 04-19-2009 07:41 PM
Condition outside loop or separate loop for different condition? - Java 12 06-15-2005 08:50 AM



Advertisments