Commit 95da83d9 authored by Antoine Pitrou's avatar Antoine Pitrou Committed by GitHub

bpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on Windows) (GH-13290)

parent 50466c66
......@@ -20,8 +20,6 @@ import signal
import sys
import threading
import warnings
import _multiprocessing
import _posixshmem
from . import spawn
from . import util
......@@ -33,10 +31,17 @@ _IGNORED_SIGNALS = (signal.SIGINT, signal.SIGTERM)
_CLEANUP_FUNCS = {
'noop': lambda: None,
'semaphore': _multiprocessing.sem_unlink,
'shared_memory': _posixshmem.shm_unlink
}
if os.name == 'posix':
import _multiprocessing
import _posixshmem
_CLEANUP_FUNCS.update({
'semaphore': _multiprocessing.sem_unlink,
'shared_memory': _posixshmem.shm_unlink,
})
class ResourceTracker(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment