1 | n/a | # |
---|
2 | n/a | # Package analogous to 'threading.py' but using processes |
---|
3 | n/a | # |
---|
4 | n/a | # multiprocessing/__init__.py |
---|
5 | n/a | # |
---|
6 | n/a | # This package is intended to duplicate the functionality (and much of |
---|
7 | n/a | # the API) of threading.py but uses processes instead of threads. A |
---|
8 | n/a | # subpackage 'multiprocessing.dummy' has the same API but is a simple |
---|
9 | n/a | # wrapper for 'threading'. |
---|
10 | n/a | # |
---|
11 | n/a | # Copyright (c) 2006-2008, R Oudkerk |
---|
12 | n/a | # Licensed to PSF under a Contributor Agreement. |
---|
13 | n/a | # |
---|
14 | n/a | |
---|
15 | n/a | import sys |
---|
16 | n/a | from . import context |
---|
17 | n/a | |
---|
18 | n/a | # |
---|
19 | n/a | # Copy stuff from default context |
---|
20 | n/a | # |
---|
21 | n/a | |
---|
22 | n/a | globals().update((name, getattr(context._default_context, name)) |
---|
23 | n/a | for name in context._default_context.__all__) |
---|
24 | n/a | __all__ = context._default_context.__all__ |
---|
25 | n/a | |
---|
26 | n/a | # |
---|
27 | n/a | # XXX These should not really be documented or public. |
---|
28 | n/a | # |
---|
29 | n/a | |
---|
30 | n/a | SUBDEBUG = 5 |
---|
31 | n/a | SUBWARNING = 25 |
---|
32 | n/a | |
---|
33 | n/a | # |
---|
34 | n/a | # Alias for main module -- will be reset by bootstrapping child processes |
---|
35 | n/a | # |
---|
36 | n/a | |
---|
37 | n/a | if '__main__' in sys.modules: |
---|
38 | n/a | sys.modules['__mp_main__'] = sys.modules['__main__'] |
---|