[pypy-dev] slow-ish multithreaded primitives
Armin Rigo
arigo at tunes.org
Sun Feb 23 10:04:33 CET 2014
Hi Dima,
On 22 February 2014 20:51, Dima Tisnek <dimaqq at 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.
More information about the pypy-dev
mailing list