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