You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
220B

  1. import time
  2. from concurrent.futures import ThreadPoolExecutor
  3. def aa(a):
  4. print("aaaaaa")
  5. time.sleep(2)
  6. with ThreadPoolExecutor(max_workers=2) as t:
  7. while True:
  8. time.sleep(10)
  9. t.submit(aa, 1)