I work with segmentation of large ctype arrays and process them in parallel. I get the error below and believe in it, because one segment of the array completes processing before the other. I tried using process.join () to wait for the first set of processes to start, but this does not work. Ideas?
Exception RuntimeError: RuntimeError('cannot join current thread',) in <Finalize object, dead> ignored
Using:
.... with closing(multiprocessing.Pool(initializer=init(array))) as p: del array
Update:
#Create an ctypes array array = ArrayConvert.SharedMemArray(array) #Create a global of options init_options(options) #options is a dict with closing(multiprocessing.Pool(initializer=init(array))) as p: del array #Since the array is not stored in a shared array destroy the array ref for memory reasons step = y
The function that I pass to map_async is stored in another module, so I am trying to get the global kwoptions passed to this function. It does not seem that there has been a global movement between the global (unpythonic) modules. Is this a way to pass kwargs through map_async.
Should I recycle multiprocessing using something else (apply or process)?
source share