This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hashstat
Recipients
Date 2006-12-01.22:32:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 15:55:29adminlinkissue1607149 messages
2007-08-23 15:55:29admincreate