| 
									
										
										
										
											2008-06-11 16:44:04 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Package analogous to 'threading.py' but using processes | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # multiprocessing/__init__.py | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # This package is intended to duplicate the functionality (and much of | 
					
						
							|  |  |  | # the API) of threading.py but uses processes instead of threads.  A | 
					
						
							|  |  |  | # subpackage 'multiprocessing.dummy' has the same API but is a simple | 
					
						
							|  |  |  | # wrapper for 'threading'. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # Copyright (c) 2006-2008, R Oudkerk | 
					
						
							| 
									
										
										
										
											2012-04-30 12:13:55 +01:00
										 |  |  | # Licensed to PSF under a Contributor Agreement. | 
					
						
							| 
									
										
										
										
											2008-06-11 16:44:04 +00:00
										 |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-16 16:41:56 +01:00
										 |  |  | import sys | 
					
						
							|  |  |  | from . import context | 
					
						
							| 
									
										
										
										
											2008-06-11 16:44:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2013-10-16 16:41:56 +01:00
										 |  |  | # Copy stuff from default context | 
					
						
							| 
									
										
										
										
											2008-06-11 16:44:04 +00:00
										 |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-16 16:41:56 +01:00
										 |  |  | globals().update((name, getattr(context._default_context, name)) | 
					
						
							|  |  |  |                  for name in context._default_context.__all__) | 
					
						
							|  |  |  | __all__ = context._default_context.__all__ | 
					
						
							| 
									
										
										
										
											2013-08-14 15:35:41 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # XXX These should not really be documented or public. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SUBDEBUG = 5 | 
					
						
							|  |  |  | SUBWARNING = 25 | 
					
						
							| 
									
										
										
										
											2008-06-11 16:44:04 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-10-08 13:07:00 +01:00
										 |  |  | # | 
					
						
							|  |  |  | # Alias for main module -- will be reset by bootstrapping child processes | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if '__main__' in sys.modules: | 
					
						
							|  |  |  |     sys.modules['__mp_main__'] = sys.modules['__main__'] |