New POW calculation module #1284

Open
Kleshni wants to merge 38 commits from Kleshni/POW into v0.6
3 changed files with 10 additions and 3 deletions
Showing only changes of commit 3c0e23574d - Show all commits

View File

@ -70,6 +70,8 @@ def signal_handler(signal, frame):
raise SystemExit
if "PoolWorker" in process.name:
raise SystemExit
if process.name == "ForkingSolver":
return
if threading.current_thread().name not in ("PyBitmessage", "MainThread"):
return
logger.error("Got signal %i", signal)

View File

@ -89,7 +89,12 @@ class ForkingSolver(object):
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
for i in xrange(len(self.processes), parallelism):
local, remote = multiprocessing.Pipe()
process = multiprocessing.Process(target = threadFunction, args = (remote, local, self.codePath, i))
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
process = multiprocessing.Process(
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
target = threadFunction,
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
args = (remote, local, self.codePath, i),
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
name = "ForkingSolver"
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
)
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
process.start()
remote.close()

omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces
omkar1117 commented 2018-06-23 12:07:47 +02:00 (Migrated from github.com)
Review

remove un necessary spaces

remove un necessary spaces

View File

@ -109,11 +109,11 @@ class TestDumbSolver(TestSolver):
class TestForkingSolver(TestSolver):
Solver = forkingsolver.ForkingSolver
configuration = 1
configuration = 3
class TestFastSolver(TestSolver):
Solver = fastsolver.FastSolver
configuration = 1
configuration = 3
class TestGPUSolver(TestSolver):
Solver = gpusolver.GPUSolver