[pypy-commit] pypy stm-gc: Disable again the ThreadLocal class.
arigo
noreply at buildbot.pypy.org
Sun Apr 29 14:35:56 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r54807:aa7889a3bf14
Date: 2012-04-29 14:31 +0200
http://bitbucket.org/pypy/pypy/changeset/aa7889a3bf14/
Log: Disable again the ThreadLocal class.
diff --git a/pypy/rlib/rstm.py b/pypy/rlib/rstm.py
--- a/pypy/rlib/rstm.py
+++ b/pypy/rlib/rstm.py
@@ -225,7 +225,7 @@
llop.stm_thread_stopping(lltype.Void)
-class ThreadLocal(object):
+class DISABLEDThreadLocal(object):
"""
A thread-local container. Use only for one or a few static places,
e.g. the ExecutionContext in the PyPy interpreter; and store any
@@ -241,9 +241,8 @@
hints={'stm_thread_local': True})
def __init__(self, Class):
- assert not we_are_translated(), (
- "You can only have a small number of ThreadLocal() instances"
- " built during translation.")
+ """NOT_RPYTHON: You can only have a small number of ThreadLocal()
+ instances built during translation."""
self.Class = Class
self.threadlocal = lltype.malloc(self.STMTHREADLOCAL, immortal=True)
diff --git a/pypy/rlib/test/test_rstm.py b/pypy/rlib/test/test_rstm.py
--- a/pypy/rlib/test/test_rstm.py
+++ b/pypy/rlib/test/test_rstm.py
@@ -119,6 +119,7 @@
py.test.raises(MyException, rstm.run_all_transactions, DoInOrder())
def test_threadlocal():
+ py.test.skip("disabled")
# not testing the thread-local factor, but only the general interface
class Point:
def __init__(self, x, y):
More information about the pypy-commit
mailing list