Multi-core POW #180

Merged
Atheros1 merged 9 commits from master into master 2013-06-03 05:46:12 +02:00
Showing only changes of commit 42a446748d - Show all commits

View File

@ -19,9 +19,9 @@ def run(target, initialHash):
for i in range(pool_size): for i in range(pool_size):
result.append(pool.apply_async(_pool_worker, args = (i, initialHash, target, pool_size))) result.append(pool.apply_async(_pool_worker, args = (i, initialHash, target, pool_size)))
while True: while True:
for counter in range(pool_size): for i in range(pool_size):
if result[counter].ready(): if result[i].ready():
result = result[counter].get() result = result[i].get()
pool.terminate() pool.terminate()
return result[0], result[1] return result[0], result[1]
time.sleep(1) time.sleep(1)