Patches item #1607149, was opened at 2006-12-01 14:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1607149&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: BC (hashstat)
Assigned to: Nobody/Anonymous (nobody)
Summary: bug# 1607041: Condition.wait timeout fails on clock change

Initial Comment:
This patch if for bug# 1607041.

If the system clock is adjusted after Condition.wait is called with a timeout, 
the timeout does not expire as expected. This appears to be due to the 
threading.Condition class using the system clock to calculate the timeout 
expiration without taking system clock changes into account.

No matter what timeout is used, setting the system clock ahead reduces or 
eliminates the wait while setting the system clock back increases the wait.  So 
if the clock is set back one hour in the middle of a 1 microsecond wait 
(c.wait(1)), wait will return in an hour and 1 microsecond rather than after 1 
microsecond.

This patch modifies the Condition classes wait method to check for variations 
in the clock between calls to sleep and ajust for abnormalities.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1607149&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to