[pypy-dev] Question about the STM module and RSTM

Armin Rigo arigo at tunes.org
Mon Jan 30 21:46:44 CET 2012


Hi,

On Mon, Jan 30, 2012 at 21:20, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
> If the stm library progresses a bit
> more, I would like to try writing Python versions of some of the STAMP
> examples.

You wouldn't be able to write pure Python versions of classical STM
examples, because the "transaction" module works at a level different
from most STM implementations.  You can try to write RPython versions
of them, just for fun, but they may break at a moment's notice.

In PyPy, we look at STM like we would look at the GC.  It may be
replaced in a week by a different one, but for the "end user" writing
pure Python code, it essentially doesn't make a difference.  That's
why we have no plan at all to let the user access all the details of
the STM library.  Even the fact that STM is used is almost an
implementation detail, which has just a few visible consequences
(similar to how the very old versions of Python had a GC based on
refcounting alone, which didn't free loops).


A bientôt,

Armin.


More information about the pypy-dev mailing list