[pypy-commit] pypy stm-gc: Disable the 'thread' module if 'transaction' is enabled.

arigo noreply at buildbot.pypy.org
Fri Apr 20 10:43:07 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r54560:1a2a28c8c0e8
Date: 2012-04-20 08:12 +0200
http://bitbucket.org/pypy/pypy/changeset/1a2a28c8c0e8/

Log:	Disable the 'thread' module if 'transaction' is enabled.

diff --git a/pypy/translator/goal/targetpypystandalone.py b/pypy/translator/goal/targetpypystandalone.py
--- a/pypy/translator/goal/targetpypystandalone.py
+++ b/pypy/translator/goal/targetpypystandalone.py
@@ -149,6 +149,14 @@
         # expose the following variables to ease debugging
         global space, entry_point
 
+        if config.translation.stm:
+            config.objspace.usemodules.transaction = True
+            config.objspace.usemodules.signal = False     # XXX! FIXME
+            config.objspace.usemodules.thread = False
+            config.translation.thread = False
+        elif config.objspace.usemodules.transaction:
+            raise Exception("use --stm, not --withmod-transaction alone")
+
         if config.objspace.allworkingmodules:
             from pypy.config.pypyoption import enable_allworkingmodules
             enable_allworkingmodules(config)
@@ -185,12 +193,6 @@
                 # module if translation.continuation cannot be enabled
                 config.objspace.usemodules._continuation = False
 
-        if config.translation.stm:
-            config.objspace.usemodules.transaction = True
-            config.objspace.usemodules.signal = False     # XXX!
-        elif config.objspace.usemodules.transaction:
-            raise Exception("use --stm, not --withmod-transaction alone")
-
         if not config.translation.rweakref:
             config.objspace.usemodules._weakref = False
 


More information about the pypy-commit mailing list