We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50466c6 commit 95da83dCopy full SHA for 95da83d
Lib/multiprocessing/resource_tracker.py
@@ -20,8 +20,6 @@
20
import sys
21
import threading
22
import warnings
23
-import _multiprocessing
24
-import _posixshmem
25
26
from . import spawn
27
from . import util
@@ -33,10 +31,17 @@
33
31
34
32
_CLEANUP_FUNCS = {
35
'noop': lambda: None,
36
- 'semaphore': _multiprocessing.sem_unlink,
37
- 'shared_memory': _posixshmem.shm_unlink
38
}
39
+if os.name == 'posix':
+ import _multiprocessing
+ import _posixshmem
+
40
+ _CLEANUP_FUNCS.update({
41
+ 'semaphore': _multiprocessing.sem_unlink,
42
+ 'shared_memory': _posixshmem.shm_unlink,
43
+ })
44
45
46
class ResourceTracker(object):
47
0 commit comments