blob: 86df63837037561179eb439bcf2e99f372a73fcb [file] [log] [blame]
Benjamin Petersone711caf2008-06-11 16:44:04 +00001#
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#
Benjamin Petersone711caf2008-06-11 16:44:04 +000011# Copyright (c) 2006-2008, R Oudkerk
Richard Oudkerk3e268aa2012-04-30 12:13:55 +010012# Licensed to PSF under a Contributor Agreement.
Benjamin Petersone711caf2008-06-11 16:44:04 +000013#
14
Benjamin Petersone711caf2008-06-11 16:44:04 +000015import sys
Richard Oudkerkb1694cf2013-10-16 16:41:56 +010016from . import context
Benjamin Petersone711caf2008-06-11 16:44:04 +000017
Richard Oudkerkb1694cf2013-10-16 16:41:56 +010018#
19# Copy stuff from default context
20#
21
22globals().update((name, getattr(context._default_context, name))
23 for name in context._default_context.__all__)
24__all__ = context._default_context.__all__
Richard Oudkerk84ed9a62013-08-14 15:35:41 +010025
26#
27# XXX These should not really be documented or public.
28#
29
30SUBDEBUG = 5
31SUBWARNING = 25
Benjamin Petersone711caf2008-06-11 16:44:04 +000032
33#
Richard Oudkerk5046e972012-10-08 13:07:00 +010034# Alias for main module -- will be reset by bootstrapping child processes
35#
36
37if '__main__' in sys.modules:
38 sys.modules['__mp_main__'] = sys.modules['__main__']