23 Feb
2014
23 Feb
'14
9:04 a.m.
Hi Dima, On 22 February 2014 20:51, Dima Tisnek <dimaqq@gmail.com> wrote:
Right, I narrowed it down to condition.wait being much slower with a timeout than without.
Thanks! Fixed. Indeed, I simply took the version of lock.acquire() from the py3k branch (with support for timeout and interrupts), and applied it in the default branch, under the name lock._py3k_acquire(). Then, simply fixing threading.py to use this, solves the performance issue reported here. I guess the same could be done with CPython --- it's just a performance fix --- but given the destructive approach of python-dev towards 2.7, I doubt it will be accepted. A bientôt, Armin.