https://github.com/python/cpython/commit/ae696e7847b535f963000ccc05fa6bc5083ea8a8 commit: ae696e7847b535f963000ccc05fa6bc5083ea8a8 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: picnixz <[email protected]> date: 2026-03-09T16:43:01Z summary:
[3.13] gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (GH-141620) (#145687) gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (GH-141620) --------- (cherry picked from commit 171133aa84cd2fa8738bdbb0c76435645810e8d3) Co-authored-by: Yashraj <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]> files: M Doc/library/concurrent.futures.rst diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 09d7a0d0ec21c3..86d3a9566d9ed7 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -147,7 +147,9 @@ And:: print(f.result()) executor = ThreadPoolExecutor(max_workers=1) - executor.submit(wait_on_future) + future = executor.submit(wait_on_future) + # Note: calling future.result() would also cause a deadlock because + # the single worker thread is already waiting for wait_on_future(). .. class:: ThreadPoolExecutor(max_workers=None, thread_name_prefix='', initializer=None, initargs=()) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
