I'm working on a project involving a lot of api calls and heavy calculation.
here is an image of the actual architecture
I have a total of 4 thread pools and some queues to allow communication between these threads. The problem is that one of these ThreadPool (cf_worker in the image) should actually perform CPU-bound tasks and I've read online that multiprocessing is ideal for CPU-bound tasks.
So, i'd like to know if there is a way to make this ProcessPool communicate with a ThreadPool through a queue in a safe way ?
Of course any advice for a better architecture would be welcome.