Skip to content Skip to sidebar Skip to footer

Python Concurrent.futures.threadpoolexecutor Max_workers

I am searching for a long time on net. But no use. Please help or try to give me some ideas how to achieve this. When I use python module concurrent.futures.ThreadPoolExecutor(max_

Solution 1:

max_worker, you can take it as threads number.

If you want to make the best of CPUs, you should keep it running (instead of sleeping).

Ideally if you set it to None, there will be ( CPU number * 5) threads at most. On average, each CPU has 5 thread to schedule. Then if one of them falls into sleep, another thread will be scheduled.

Post a Comment for "Python Concurrent.futures.threadpoolexecutor Max_workers"