AsyncIO + Process Pool In Python

Viewed 162

My understanding of AsyncIO is that it is single threaded and uses single core. To leverage multiple cores we use ProcessPoolExecutor or multiprocessing.Pool. Is there an implementation where we can combine the power of two ?.

Something where we create pool of workers reading from a single queue. Main thread adds in queue and then all of the workers in the pool are basically using event loop to process more than one request concurrently.

Once task is completed, they write back to another queue, where the main thread's event loop discovers the response.

0 Answers
Related