How to Use Python to Run an App in a New Process: Best Practices?

18 Replies, 1606 Views

Hmm, Python run app in new process can be tricky, but `multiprocessing` is your friend here. If you’re worried about blocking, just spawn the process and let it do its thing.

For cleanup, I’d suggest using context managers (`with` statements) to ensure resources are released properly. And yeah, `atexit` is a bit much unless you’ve got a ton of cleanup to do.

Also, don’t forget to test on your target environment—some OSes handle processes differently. Good luck!

Messages In This Thread



Users browsing this thread: 1 Guest(s)