Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r76483:749349c85755
Date: 2015-03-20 19:22 +0100
http://bitbucket.org/pypy/pypy/changeset/749349c85755/
Log: Phew, this took quite a bit of guessing. See comments.
diff --git a/lib_pypy/transaction.py b/lib_pypy/transaction.py
--- a/lib_pypy/transaction.py
+++ b/lib_pypy/transaction.py
@@ -216,6 +216,12 @@
assert len(pending) == 0
while True:
f, args, kwds = next_transaction
+ # The next hint_commit_soon() is essential: without it, the
+ # current transaction is short, so far, but includes everything
+ # after some lock.acquire() done recently. That means that
+ # anything we do in the atomic section will run with the lock
+ # still acquired. This prevents any parallelization.
+ hint_commit_soon()
with atomic:
if exception:
break
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit