cpython/Lib/multiprocessing
Miss Islington (bot) 0c49a09e67
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 9a458befdd)

Co-authored-by: samtygier <samtygier@yahoo.co.uk>
2022-06-16 07:07:32 -07:00
..
dummy
__init__.py
connection.py GH-91355: micro-optimize Connection.send_bytes() method (gh-32247) 2022-05-03 23:41:45 +09:00
context.py gh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617) 2022-06-10 08:04:55 -07:00
forkserver.py
heap.py
managers.py gh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112) 2022-04-19 16:27:00 +02:00
pool.py
popen_fork.py
popen_forkserver.py
popen_spawn_posix.py
popen_spawn_win32.py
process.py gh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617) 2022-06-10 08:04:55 -07:00
queues.py bpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage collection and explicit close (#31913) 2022-05-03 17:49:57 -06:00
reduction.py
resource_sharer.py
resource_tracker.py bpo-40692: Run more test_concurrent_futures tests (GH-20239) 2021-02-08 03:15:51 +00:00
shared_memory.py gh-91577: SharedMemory move imports out of methods (GH-91579) 2022-06-16 07:07:32 -07:00
sharedctypes.py
spawn.py bpo-46720: Add support for path-like objects to multiprocessing.set_executable for Windows (GH-31279) 2022-04-22 15:47:09 -07:00
synchronize.py bpo-25066: Added repr for multiprocessing.Event (GH-29749) 2021-12-09 13:16:45 +00:00
util.py gh-82616: Add process_group support to subprocess.Popen (#23930) 2022-05-05 16:22:32 -07:00