[pypy-commit] pypy stm-gc: Fix.
arigo
noreply at buildbot.pypy.org
Sat Apr 21 12:03:06 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
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()
More information about the pypy-commit
mailing list