0

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.

  • Does this answer your question? [Filling a queue and managing multiprocessing in python](https://stackoverflow.com/questions/17241663/filling-a-queue-and-managing-multiprocessing-in-python) – S4eed3sm Jan 06 '22 at 18:47

0 Answers0