Author: Armin Rigo <[email protected]>
Branch: stm-thread
Changeset: r55474:e054fd8fe9d4
Date: 2012-06-07 18:17 +0200
http://bitbucket.org/pypy/pypy/changeset/e054fd8fe9d4/
Log: Fix for corner cases of non-properly-nested atomic blocks.
diff --git a/pypy/translator/stm/src_stm/core.c
b/pypy/translator/stm/src_stm/core.c
--- a/pypy/translator/stm/src_stm/core.c
+++ b/pypy/translator/stm/src_stm/core.c
@@ -846,7 +846,11 @@
d->reads_size_limit_nonatomic = stm_regular_length_limit >> counter;
if (!d->atomic)
begin_transaction(&_jmpbuf);
+
+ /* invoke the callback in the new transaction */
result = callback(arg, counter);
+
+ v_atomic = d->atomic;
if (!d->atomic)
stm_commit_transaction();
counter = 0;
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit