Commit 9e592e71 authored by Thomas Vincent's avatar Thomas Vincent

Make KmapMerger work on Windows

parent f2edbf52
......@@ -259,17 +259,11 @@ class KmapMerger(object):
else:
n_proc = self.__n_proc
def init(term_evt_, shared_progress_):
global g_term_evt
global g_shared_progress
g_term_evt = term_evt_
g_shared_progress = shared_progress_
# setting progress to 0
np.frombuffer(self.__shared_progress, dtype='int32')[:] = 0
pool = Pool(n_proc,
initializer=init,
initializer=_init_process,
initargs=(term_evt,
self.__shared_progress),
maxtasksperchild=2)
......@@ -711,6 +705,17 @@ def parse_scan_command(command):
# #######################################################################
# #######################################################################
def _init_process(term_evt_, shared_progress_):
"""Init function for process
:param term_evt_: Process terminaison event
:param shared_progress_: Shared progress array
"""
global g_term_evt
global g_shared_progress
g_term_evt = term_evt_
g_shared_progress = shared_progress_
def _add_edf_data(scan_id,
proc_idx,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment