[fix] fixing a bug introduced accidently by merge
This commit is contained in:
parent
0dd69a0e19
commit
53614bb5b9
@ -18,19 +18,19 @@ def _pickle_method(m):
|
|||||||
|
|
||||||
|
|
||||||
def worker(func, input, cores='max', async=False):
|
def worker(func, input, cores='max', async=False):
|
||||||
return result
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
if cores == 'max':
|
if cores == 'max':
|
||||||
cores = multiprocessing.cpu_count()
|
cores = multiprocessing.cpu_count()
|
||||||
pool = multiprocessing.Pool(cores)
|
|
||||||
|
|
||||||
|
pool = multiprocessing.Pool(cores)
|
||||||
if async == True:
|
if async == True:
|
||||||
result = pool.map_async(func, input)
|
result = pool.map_async(func, input)
|
||||||
else:
|
else:
|
||||||
result = pool.map(func, input)
|
result = pool.map(func, input)
|
||||||
pool.close()
|
pool.close()
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
def demeanTrace(trace, window):
|
def demeanTrace(trace, window):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user