Author: Armin Rigo <ar...@tunes.org>
Branch: stm-gc
Changeset: r54611:b3728c83978e
Date: 2012-04-21 14:49 +0200
http://bitbucket.org/pypy/pypy/changeset/b3728c83978e/

Log:    Move these too.

diff --git a/pypy/translator/stm/test/targetdemo.py 
b/pypy/translator/stm/test/targetdemo.py
--- a/pypy/translator/stm/test/targetdemo.py
+++ b/pypy/translator/stm/test/targetdemo.py
@@ -100,7 +100,6 @@
 
 @rgc.no_collect     # don't use the gc as long as other threads are running
 def _run():
-    rstm.enter_transactional_mode()
     i = 0
     while i < glob.NUM_THREADS:
         glob._arg = glob._arglist[i]
@@ -112,7 +111,6 @@
     while glob.done < glob.NUM_THREADS:    # poor man's lock
         _sleep(rffi.cast(rffi.ULONG, 1))
     debug_print("done sleeping.")
-    rstm.leave_transactional_mode()
 
 
 # Posix only
@@ -135,7 +133,11 @@
     glob.lock = ll_thread.allocate_ll_lock()
     ll_thread.acquire_NOAUTO(glob.lock, True)
     glob._arglist = [Arg() for i in range(glob.NUM_THREADS)]
+    #
+    rstm.enter_transactional_mode()
     _run()
+    rstm.leave_transactional_mode()
+    #
     check_chained_list(glob.anchor.next)
     return 0
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to