New submission from Michael Olson <[email protected]>:
In an application with an entry point of __main__.py, multiprocessing.Pool
throws the following:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Dev\Python27\lib\multiprocessing\forking.py", line 346, in main
prepare(preparation_data)
File "D:\Dev\Python27\lib\multiprocessing\forking.py", line 454, in prepare
assert main_name not in sys.modules, main_name
AssertionError: __main__
These messages repeat as long as the application is running.
Demonstration Code, must be in file named __main__.py:
--------------------
import multiprocessing
import time
if __name__ == '__main__':
pool = multiprocessing.Pool()
time.sleep(2)
--------------------
----------
components: Library (Lib)
messages: 118905
nosy: Michael.Olson
priority: normal
severity: normal
status: open
title: multiprocessing.Pool throws exception with __main__.py
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10128>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com