title: Why do I get NameError: name 'as_completed' is not defined (I have from concurrent.futures import ThreadPoolExecutor)
body: <p>I have the following code:</p>
  <p>from concurrent.futures import ThreadPoolExecutor</p>
  <pre><code>def load_database():
      with ThreadPoolExecutor(max_workers=10) as executor:
          futures = [executor.submit(load_person, x) for x in range(max_people - 1)]
          for future in as_completed(futures):
              return(future.result()) 
          print(futures)
  </code></pre>
  <p>I am getting  &quot;NameError: name 'as_completed' is not defined&quot;</p>
  <p>Do I need to import something else to use as_completed?</p>
  <p>Thanks,
  Chrissy</p>