Message118905
| Author |
Michael.Olson |
| Recipients |
Michael.Olson |
| Date |
2010年10月16日.22:41:50 |
| SpamBayes Score |
1.3105453e-07 |
| Marked as misclassified |
No |
| Message-id |
<1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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)
-------------------- |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年10月16日 22:41:53 | Michael.Olson | set | recipients:
+ Michael.Olson |
| 2010年10月16日 22:41:53 | Michael.Olson | set | messageid: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> |
| 2010年10月16日 22:41:50 | Michael.Olson | link | issue10128 messages |
| 2010年10月16日 22:41:50 | Michael.Olson | create |
|