Reviewed: https://review.openstack.org/529082 Committed: https://git.openstack.org/cgit/openstack/futurist/commit/?id=8fff2242ff53735255247a1b126727e374fe9159 Submitter: Zuul Branch: master
commit 8fff2242ff53735255247a1b126727e374fe9159 Author: Chenjun Shen <email address hidden> Date: Tue Dec 19 15:19:56 2017 +0100
Improve get optimal count of max_worker for pool
In the upstream of futures library, the DEFAULT value max_worker for ThreadPoolExecutor and ProcessPoolExecutor has been changed to:
ThreadPoolExecutor
max_worker = cpu_count() * 5
Reference: https://github.com/agronholm/pythonfutures/blob/master/concurrent/futures/thread.py#L109
ProcessPoolExecutor
max_worker = cpu_count()
Reference: https://github.com/agronholm/pythonfutures/blob/master/concurrent/futures/process.py#L278
So we should do it as well.
Change-Id: Id68e38a639c41426f125180ad335fb1fb97cba59 Closes-bug: #1739034
Reviewed: https:/ /review. openstack. org/529082 /git.openstack. org/cgit/ openstack/ futurist/ commit/ ?id=8fff2242ff5 3735255247a1b12 6727e374fe9159
Committed: https:/
Submitter: Zuul
Branch: master
commit 8fff2242ff53735 255247a1b126727 e374fe9159
Author: Chenjun Shen <email address hidden>
Date: Tue Dec 19 15:19:56 2017 +0100
Improve get optimal count of max_worker for pool
In the upstream of futures library, the DEFAULT value max_worker
for ThreadPoolExecutor and ProcessPoolExecutor has been changed to:
ThreadPoolE xecutor
max_worker = cpu_count() * 5
Reference: /github. com/agronholm/ pythonfutures/ blob/master/ concurrent/ futures/ thread. py#L109
https:/
ProcessPool Executor
max_worker = cpu_count()
Reference: /github. com/agronholm/ pythonfutures/ blob/master/ concurrent/ futures/ process. py#L278
https:/
So we should do it as well.
Change-Id: Id68e38a639c414 26f125180ad335f b1fb97cba59
Closes-bug: #1739034