Author: Armin Rigo <[email protected]>
Branch: stm-gc
Changeset: r54606:5ec30c19bc26
Date: 2012-04-21 11:31 +0200
http://bitbucket.org/pypy/pypy/changeset/5ec30c19bc26/

Log:    Fix.

diff --git a/pypy/module/transaction/interp_transaction.py 
b/pypy/module/transaction/interp_transaction.py
--- a/pypy/module/transaction/interp_transaction.py
+++ b/pypy/module/transaction/interp_transaction.py
@@ -320,14 +320,12 @@
 @rgc.no_collect
 def _run():
     # --- start the threads --- don't use the GC here any more! ---
-    rstm.enter_transactional_mode()
     #
     for i in range(state.num_threads):
         threadintf.start_new_thread(_run_thread)
     #
     state.lock_unfinished()  # wait for all threads to finish
     #
-    rstm.leave_transactional_mode()
     # --- done, we can use the GC again ---
 
 
@@ -355,7 +353,9 @@
     state.running = True
     #
     # start the threads and wait for all of them to finish
+    rstm.enter_transactional_mode()
     _run()
+    rstm.leave_transactional_mode()
     #
     assert state.num_waiting_threads == 0
     assert state.pending.is_empty()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to