diff options
author | samtygier <samtygier@yahoo.co.uk> | 2022-06-16 13:41:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 13:41:51 (GMT) |
commit | 9a458befdd68625d088f4fea7df135a57d147deb (patch) | |
tree | b31d13db745f5d486d75cf112e9e2a554e47fbaf /Objects/interpreteridobject.c | |
parent | a38c2a61d585fce0973e93dd590551ccddd947fb (diff) | |
download | cpython-9a458befdd68625d088f4fea7df135a57d147deb.zip cpython-9a458befdd68625d088f4fea7df135a57d147deb.tar.gz cpython-9a458befdd68625d088f4fea7df135a57d147deb.tar.bz2 |
gh-91577: SharedMemory move imports out of methods (#91579)
SharedMemory.unlink() uses the unregister() function from resource_tracker. Previously it was imported in the method, but this can fail if the method is called during interpreter shutdown, for example when unlink is part of a __del__() method.
Moving the import to the top of the file, means that the unregister() method is available during interpreter shutdown.
The register call in SharedMemory.__init__() can also use this imported resource_tracker.
Diffstat (limited to 'Objects/interpreteridobject.c')
0 files changed, 0 insertions, 0 deletions