Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commented Apr 1, 2024

Add a special case for list.extend(dict) and list(dict) so that those patterns behave atomically with respect to modifications to the list or dictionary when the GIL is disabled.

This is required by multiprocessing, which assumes that list(_finalizer_registry) is atomic.

Add a special case for `list.extend(dict)` and `list(dict)` so that those patterns behave atomically with respect to modifications to the list or dictionary. This is required by multiprocessing, which assumes that `list(_finalizer_registry)` is atomic.
Copy link
Member

@corona10corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@colesburycolesbury merged commit 027fa2e into python:mainApr 2, 2024
@colesburycolesbury deleted the gh-112087-dict branch April 2, 2024 14:45
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…17438) Add a special case for `list.extend(dict)` and `list(dict)` so that those patterns behave atomically with respect to modifications to the list or dictionary. This is required by multiprocessing, which assumes that `list(_finalizer_registry)` is atomic.
Sign up for freeto 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.

2 participants

@colesbury@corona10