gh-112087: Make `list.extend(dict)` behave atomically by colesbury · Pull Request #117438 · python/cpython

@colesbury

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.

corona10

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.