Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread #75507

Closed
vstinner opened this issue Sep 1, 2017 · 4 comments
Labels
3.7 (EOL) end of life performance Performance or resource usage

Comments

@vstinner
Copy link
Member

vstinner commented Sep 1, 2017

BPO 31326
Nosy @vstinner
PRs
  • bpo-31326: ProcessPoolExecutor waits for the call queue thread #3265
  • [3.6] bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265) #3309
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-09-05.16:43:29.207>
    created_at = <Date 2017-09-01.16:45:47.113>
    labels = ['3.7', 'performance']
    title = 'concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread'
    updated_at = <Date 2017-09-05.16:43:29.206>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-09-05.16:43:29.206>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-09-05.16:43:29.207>
    closer = 'vstinner'
    components = []
    creation = <Date 2017-09-01.16:45:47.113>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31326
    keywords = []
    message_count = 4.0
    messages = ['301135', '301139', '301154', '301332']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['3265', '3309']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue31326'
    versions = ['Python 3.7']

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2017

    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.

    @vstinner vstinner added 3.7 (EOL) end of life performance Performance or resource usage labels Sep 1, 2017
    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2017

    See also bpo-31249 and commit bc61315: "Fix ref cycle in ThreadPoolExecutor".

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 1, 2017

    New changeset b713adf by Victor Stinner in branch 'master':
    bpo-31326: ProcessPoolExecutor waits for the call queue thread (bpo-3265)
    b713adf

    @vstinner
    Copy link
    Member Author

    vstinner commented Sep 5, 2017

    Antoine Pitrou: "I don't terribly like this being backported. It does not fix any user-visible problem AFAIK."

    #3309 (comment)

    Ok, let's close this issue.

    @vstinner vstinner closed this as completed Sep 5, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant