[pypy-commit] benchmarks default: Fix the multithreaded richards as done in c1d1f4dd5f5f for translator/goal/richards.py.
arigo
noreply at buildbot.pypy.org
Mon May 5 14:15:44 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
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)
More information about the pypy-commit
mailing list