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.

classification
Title: concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread
Type: resource usage Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2017-09-01 16:45 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3265 merged vstinner, 2017-09-01 16:49
PR 3309 closed vstinner, 2017-09-04 21:21
Messages (4)
msg301135 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-01 16:45
concurrent.futures.ProcessPoolExecutor.shutdown(wait=True) doesn't wait for the call queue thread, and so test_concurrent_futures randomly emits warnings about dangling threads, especially with PR 3138 of bpo-31234.

Attached PR fixes the issue.
msg301139 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-01 17:03
See also bpo-31249 and commit bc61315377056fe362b744d9c44e17cd3178ce54: "Fix ref cycle in ThreadPoolExecutor".
msg301154 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-01 22:25
New changeset b713adf27a76b5df95e3ee5f85f9064a2763ae35 by Victor Stinner in branch 'master':
bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)
https://github.com/python/cpython/commit/b713adf27a76b5df95e3ee5f85f9064a2763ae35
msg301332 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-05 16:43
Antoine Pitrou: "I don't terribly like this being backported. It does not fix any user-visible problem AFAIK."

https://github.com/python/cpython/pull/3309#issuecomment-327231614

Ok, let's close this issue.
History
Date User Action Args
2022-04-11 14:58:51adminsetgithub: 75507
2017-09-05 16:43:29vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg301332

stage: resolved
2017-09-04 21:21:34vstinnersetpull_requests: + pull_request3337
2017-09-01 22:25:13vstinnersetmessages: + msg301154
2017-09-01 17:03:45vstinnersetmessages: + msg301139
2017-09-01 16:49:08vstinnersetpull_requests: + pull_request3309
2017-09-01 16:45:47vstinnercreate