The gist of my question is what happens to a multiprocessing queue when the parent (a daemon in this circumstance) is killed.
I have a daemon that runs in the background which queues up jobs for child processes:
class manager(Daemon):
def run(self):
someQueue = MP.Queue()
someChild = MP.Process(target=someCode, args=(someArgs))
someChild.start()
...
If the manager is killed (assuming it wasn't trying to use someQueue
and therefore corrupted it as mentioned in the documentation), is there anyway to recover the data in the Queue?
Two theoretical solutions I see are cleaning up the someQueue
in someChild
before exiting this child process. Also dumping the queues so that I could restore the state of the queues when the manager exited would also solve my problem. However, before implementing either it would be nice to get nudged in the right direction.
Thanks,