Context:
- A Python application server that uses a
concurrent.futures.process.ProcessPool
to execute code - We sometimes want to hot reload imported code without restarting the entire server process
(yes I know importlib.reload
has caveats)
To get this to work I imagine I would have to execute the importlib.reload
in every multiprocessing
process that is managed by the process pool.
Is there a way to submit something to all processes in a process pool?
from Submit code for execution to all processes in a concurrent.futures.ProcessPool
No comments:
Post a Comment