STINNER Victor added the comment:

"I'm working on a patch, but I noticed a similar issue in Condition.wait(), 
which also keeps re-evaluating the "remaining sleep time" based on the current 
kernel clock, with similar effects."

I see that Lock.acquire(timeout) uses the C function gettimeofday() to 
recompute the timeout if acquiring the lock was interrupted (C error "EINTR"). 
It would be better to use a monotonic clock here, but please open a new issue 
because it's unrelated to nanosleep().

Or did you another bug?

By the way, you didn't mention the Python version. Are you working on Python 
2.7 or 3.5?

See also the PEP 418.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21302>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to