I want to use multiprocessing
module to complete this.
when I do this, like:
$ python my_process.py
I start a pare
Here's one way to achieve an independent child process that does not exit when __main__
exits. It uses the os._exit()
tip mentioned above by @WKPlus.
Is there a way to detach matplotlib plots so that the computation can continue?
A trick: call os._exit
to make parent process exit, in this way daemonic child processes will not be killed.
But there are some other side affects, described in the doc:
Exit the process with status n, without calling cleanup handlers,
flushing stdio buffers, etc.
If you do not care about this, you can use it.