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 pitrou
Recipients ddvoinikov, pitrou
Date 2010-09-18.15:50:57
SpamBayes Score 9.423852e-09
Marked as misclassified No
Message-id <1284825054.3220.23.camel@localhost.localdomain>
In-reply-to <1284823915.02.0.150115993057.issue9892@psf.upfronthosting.co.za>
Content
> You are right, sorry. It's Windows XP Prof, Python 3.2a2.
> 
> The differences in OS may be the cause, but the problem doesn't appear
> in 3.1 on the same machine.

The implementation changed between 3.1 and 3.2. On 3.1, wait() with
timeout ran a polling loop until either the event was set or the delay
was expired (and it used time() itself, which kind of guarantees that
your case would always produce the expected result).

On 3.2, wait() with timeout simply calls the adequate OS function
(sem_timedwait under POSIX, WaitForSingleObject under Windows). It is
actually more precise, because the polling loop and its sleep() calls
are eliminated.

Also, I just traced the WaitForSingleObject call under a Windows VM, and
it gets called with the correct timeout value (100 ms).
History
Date User Action Args
2010-09-18 15:50:59pitrousetrecipients: + pitrou, ddvoinikov
2010-09-18 15:50:57pitroulinkissue9892 messages
2010-09-18 15:50:57pitroucreate