[pypy-dev] STM on CPython
Laura Creighton
lac at openend.se
Fri Aug 26 21:29:50 CEST 2011
Armin wrote:
>So, all this to say: 8 years later, I implemented that on CPython:
>https://bitbucket.org/arigo/cpython-withatomic/overview (on the 2.7
>branch). It is sadly a fork of CPython instead of a C extension
>module because it needs to access and change a few things in ceval.c.
>The total patch is 190 lines, and that's because I need a new type
>(very verbose). It implements "thread.atomic", which you use in a
>"with" statement. So you write "with atomic:" and you get precisely
>the simple case described here:
>http://en.wikipedia.org/wiki/Software_transactional_memory#Proposed_language_support.
>
>Fwiw it's probably also a minimal patch to PyPy. Sorry for being
>mostly off-topic for once...
Have you told python-dev about this?
Laura
More information about the pypy-dev
mailing list