threading.py Condition wait overflow error

Discussion in 'Python' started by Mark English, Jan 25, 2005.

  1. Mark English

    Mark English Guest

    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.
    -----------------------------------------------------------------------
     
    Mark English, Jan 25, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. -
    Replies:
    12
    Views:
    702
    Remon van Vliet
    Jun 15, 2005
  2. Replies:
    18
    Views:
    533
  3. Gabriel Rossetti
    Replies:
    11
    Views:
    1,136
    Piet van Oostrum
    Jul 17, 2009
  4. Floris Bruynooghe

    Condition.wait(timeout) oddities

    Floris Bruynooghe, May 23, 2011, in forum: Python
    Replies:
    1
    Views:
    271
    Chris Torek
    May 23, 2011
  5. Bill W.
    Replies:
    13
    Views:
    303
    Phillip Gawlowski
    May 9, 2011
Loading...

Share This Page