Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r257:d047b054ff7f
Date: 2014-05-05 14:15 +0200
http://bitbucket.org/pypy/benchmarks/changeset/d047b054ff7f/

Log:    Fix the multithreaded richards as done in c1d1f4dd5f5f for
        translator/goal/richards.py.

diff --git a/multithread/multithread-richards.py 
b/multithread/multithread-richards.py
--- a/multithread/multithread-richards.py
+++ b/multithread/multithread-richards.py
@@ -370,7 +370,6 @@
     def __init__(self):
         self.finished_lock = thread.allocate_lock()
         self.finished_lock.acquire()
-        self.taskWorkArea = TaskWorkArea()
 
     def run_and_unlock(self, to_do):
         os.write(1, 'running...\n')
@@ -382,15 +381,14 @@
             except IndexError:
                 break
             iterations += 1
-            self.result = self.run(self.taskWorkArea)
+            self.result = self.run()
         os.write(1, 'done, iterations=%d, result=%r\n' % (iterations, 
self.result))
         self.finished_lock.release()
 
-    def run(self, taskWorkArea):
+    def run(self):
         #with atomic:
         if 1:
-            taskWorkArea.holdCount = 0
-            taskWorkArea.qpktCount = 0
+            taskWorkArea = TaskWorkArea()
 
             IdleTask(I_IDLE, 1, 10000, TaskState().running(), IdleTaskRec(),
                      taskWorkArea)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to