简体   繁体   中英

What is the Maximum number of python asyncio tasks

I am designing an application where I create 10000 tasks.

I have a coroutine (async function that queried webservice) and I do asyncio create_task on the coroutine 10000 times with different parameters.

Is there an upper limit of tasks that can be run concurrently?

There is no fixed upper limit, It depends on hardware as you're (probably) not using a theoretical computer but a physical hardware one, so you have limited resources.

Typically, the number of threads the run truly concurrently is determined by the number of CPUs and CPU cores (including hyper threading) you have. That is to say that at any given time the number of threads running (in the operating system) is equal to the number of "cores".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM