bpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on Windows) (GH-13290)
This commit is contained in:
parent
50466c6650
commit
95da83d9ba
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in New Issue