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

gh-112087: Make list.sort to be thread-safe for PEP 703. #116553

Merged
merged 3 commits into from
Mar 10, 2024

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Mar 9, 2024

@corona10
Copy link
Member Author

corona10 commented Mar 9, 2024

  • No resizing in here
  • QSBR was already applied:

    cpython/Objects/listobject.c

    Lines 2854 to 2861 in 17d31bf

    #ifdef Py_GIL_DISABLED
    bool use_qsbr = _PyObject_GC_IS_SHARED(self);
    #else
    bool use_qsbr = false;
    #endif
    free_list_items(final_ob_item, use_qsbr);
    }
    return Py_XNewRef(result);

@corona10 corona10 changed the title gh-112087: Make list.sort to be threaf-safe for PEP 703. gh-112087: Make list.sort to be thread-safe for PEP 703. Mar 10, 2024
@corona10 corona10 requested a review from colesbury March 10, 2024 00:20
@corona10 corona10 enabled auto-merge (squash) March 10, 2024 00:32
@corona10 corona10 merged commit 5b2f21f into python:main Mar 10, 2024
34 checks passed
@corona10 corona10 deleted the gh-112087-sort branch March 10, 2024 01:00
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants