This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gaoxinge
Recipients fireattack, gaoxinge
Date 2020-03-29.15:18:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585495102.16.0.626178232921.issue40093@roundup.psfhosted.org>
In-reply-to
Content
```
from concurrent.futures import ThreadPoolExecutor
from time import sleep

def wait_on_future():
    sleep(1)
    print(f.done()) # f is not done obviously
    f2 = executor.submit(pow, 5, 2)
    print(f2.result())
    sleep(1)    
    

executor = ThreadPoolExecutor(max_workers=100)
f = executor.submit(wait_on_future)
executor.shutdown(wait=True)
print(f.done())         # True
print(f.result())       # raise errror: cannot schedule new futures after shutdown
# print(f.exception())
```

Actually `executor.shutdown(wait=True)` works, it really wait f to be done.
History
Date User Action Args
2020-03-29 15:18:22gaoxingesetrecipients: + gaoxinge, fireattack
2020-03-29 15:18:22gaoxingesetmessageid: <1585495102.16.0.626178232921.issue40093@roundup.psfhosted.org>
2020-03-29 15:18:22gaoxingelinkissue40093 messages
2020-03-29 15:18:22gaoxingecreate