[pypy-commit] pypy stmgc-c7: pom pom pom another try

arigo noreply at buildbot.pypy.org
Tue Mar 24 21:05:23 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r76550:93c0ee39bd3f
Date: 2015-03-24 20:18 +0100
http://bitbucket.org/pypy/pypy/changeset/93c0ee39bd3f/

Log:	pom pom pom another try

diff --git a/pypy/module/pypystm/threadlocals.py b/pypy/module/pypystm/threadlocals.py
--- a/pypy/module/pypystm/threadlocals.py
+++ b/pypy/module/pypystm/threadlocals.py
@@ -40,3 +40,7 @@
             interval = space.actionflag.getcheckinterval()
             rstm.set_transaction_length(interval / 10000.0)
 
+    def leave_thread(self, space):
+        # must turn inevitable, for raw_thread_local.set(None)
+        rstm.become_inevitable()
+        OSThreadLocals.leave_thread(self, space)
diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -332,8 +332,6 @@
                 _threadlocalref_seeme(self)
                 addr = llop.threadlocalref_addr(llmemory.Address)
                 if rgc.stm_is_enabled():
-                    from rpython.rlib import rstm
-                    rstm.become_inevitable()
                     p = llmemory.cast_adr_to_ptr(addr + offset, PSTRUCTTYPE)
                     p.c_value = value
                 else:


More information about the pypy-commit mailing list