Author: Remi Meier
Branch: 
Changeset: r963:b053337ca45e
Date: 2014-03-05 15:48 +0100
http://bitbucket.org/pypy/stmgc/changeset/b053337ca45e/

Log:    add inevitable transactions to the mix

diff --git a/c7/demo/demo_random.c b/c7/demo/demo_random.c
--- a/c7/demo/demo_random.c
+++ b/c7/demo/demo_random.c
@@ -273,12 +273,17 @@
     int k;
 
     _r = get_random_root();
-    k = get_rand(11);
+    k = get_rand(12);
 
-    if (k < 10)
+    if (k < 10) {
         p = simple_events(p, _r);
-    else if (get_rand(20) == 1) {
+    } else if (get_rand(20) == 1) {
         return (objptr_t)-1; // break current
+    } else if (get_rand(20) == 1) {
+        push_roots();
+        stm_become_inevitable("please");
+        pop_roots();
+        return NULL;
     }
     return p;
 }
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to