title: Strange behavior with python thread pool
body: <p>I am trying to use python's threadpool </p>
  
  <pre><code>concurrent.futures.ThreadPoolExecutor
  </code></pre>
  
  <p>I am making an api call and I want to parallelize it using the threadpool executor</p>
  
  <p>Run the api call asynchronously for 1 second</p>
  
  <pre><code>executor = ThreadPoolExecutor(max_workers=10)
  
  initial_start_time = time.time()
  count = 0
  
  while True:
      start_time = time.time()
      future = executor.submit(api_call_func)
      end_time = time.time()
  
      if ((end_time-initial_start_time) &gt; 1):
          break;
      count = count+1
      list.append(future)
  print(count)
  </code></pre>
  
  <p>Now when I change the number of workers defined in max_workers from 1 to 10. The count starts decreasing.</p>
  
  <pre><code>1 - 10K
  5 - 1K
  10 - 608
  </code></pre>
  
  <p>So using more workers is actually hurting performance. Why is this happening? I know python uses only one thread at a time. But still since the api call is IO bound, this should have helped.</p>
  
  <p>A single rpc api call takes about 5 ms. It is like bare minimum api with no processing.</p>
  
  <p>Can anyone let me know like what is happening here?</p>