How to synchronize and communicate between subthreads and subprocesses in Python?
I want to implement load balancing in my python service.
It is a grpc service. When requests come in , I want to process the request in process because each request will run in GPU.
Python Multithreading – Unterminated Processes
The code below, which I’ve modeled after the code I’m working on and simplified for the purpose of this question, doesn’t seems to be using p.join() properly to manage the processes created by p.start() As a result, there’s a memory leak, and the K8S pod where this code runs experiences resource exhaustion. Is there something obvious I’m missing?