Author: Armin Rigo <[email protected]> Branch: Changeset: r76648:f588efa4658d Date: 2015-03-30 21:42 +0200 http://bitbucket.org/pypy/pypy/changeset/f588efa4658d/
Log: 'transaction.py' can be used on cpython or regular pypy diff --git a/pypy/doc/stm.rst b/pypy/doc/stm.rst --- a/pypy/doc/stm.rst +++ b/pypy/doc/stm.rst @@ -564,6 +564,15 @@ Miscellaneous functions ----------------------- +* First, note that the ``transaction`` module is found in the file + ``lib_pypy/transaction.py``. This file can be copied around to + execute the same programs on CPython or on non-STM PyPy, with + fall-back behavior. (One case where the behavior differs is + ``atomic``, which is in this fall-back case just a regular lock; so + ``with atomic`` only prevent other threads from entering other + ``with atomic`` sections, but won't prevent other threads from + running non-atomic code.) + * ``transaction.getsegmentlimit()``: return the number of "segments" in this pypy-stm. This is the limit above which more threads will not be able to execute on more cores. (Right now it is limited to 4 due to _______________________________________________ pypy-commit mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-commit
