summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-16 14:07:32 (GMT)
committerGitHub <noreply@github.com>2022-06-16 14:07:32 (GMT)
commit0c49a09e67407f810ace5e13399a6aa633fbadb7 (patch)
treeee4948fab87b3830c25173cd70c684be5cd3a784 /Include
parent62f72e481183c89f94aa3d8e30c6d453db490561 (diff)
downloadcpython-0c49a09e67407f810ace5e13399a6aa633fbadb7.zip
cpython-0c49a09e67407f810ace5e13399a6aa633fbadb7.tar.gz
cpython-0c49a09e67407f810ace5e13399a6aa633fbadb7.tar.bz2
gh-91577: SharedMemory move imports out of methods (GH-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. (cherry picked from commit 9a458befdd68625d088f4fea7df135a57d147deb) Co-authored-by: samtygier <samtygier@yahoo.co.uk>
Diffstat (limited to 'Include')
0 files changed, 0 insertions, 0 deletions