The typical Python threadpool will have a structure like this one:
def run(self):
while True:
z=self.some_task_queue.get()
do_work(z)
So it appears that there is a continuous monitoring of the task queue.
How CPU intensive is this continuous monitoring of the task queue?
Would it be better to introduce some
sleep(few milliseconds) time to lower the CPU load?
In this way one could stop the monitoring of the task queue for some time when
all threads are busy and decrease the CPU load.
There is
0.0%cpu load while 1000 threads are blocked on.get()on my machine: