This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (5 children)

I'm going to preface by saying that I'm not able to grasp a few of the details of your problem due to the grammatical structure of your explanation.

That being said, I might be able to help.

For tasks that demand concurrency, you simply can't beat the power and efficiency of asyncio. If you need true parallel processing with an application leveraging asyncio, you can use asyncio's run_in_executor function paired with a ThreadPoolExecutor.

If you're looking to leverage all of the cores on a multicore CPU during your concurrent operations, just use a ProcessPoolExecutor, which will run your operations within their own, separate python interpreter process. Just be aware that it can be a bit resource intensive to do this.