繁体   English   中英

IronPython是否支持多处理?

[英]Does IronPython support multiprocessing?

使用IronPython 2.7( IronPython 2.7 2.7.5.0 on .NET 4.0.30319.42000 ),我有一个包含from multiprocessing import Pool的脚本。 试图运行它,我收到以下错误:

Traceback (most recent call last):
  File "find_compressed.concurrent.py", line 67, in <module>
  File "find_compressed.concurrent.py", line 59, in main
  File "IronPython 2.7\Lib\multiprocessing\__init__.py", line 236, in Pool
  File "IronPython 2.7\Lib\multiprocessing\pool.py", line 115, in __init__
  File "IronPython 2.7\Lib\multiprocessing\pool.py", line 207, in _setup_queues
  File "IronPython 2.7\Lib\multiprocessing\queues.py", line 46, in <module>
ImportError: No module named _multiprocessing

是否可以在IronPython中使用multiprocessing模块? 如果没有,是否有另一种方法来获得此功能?

根据这封电子邮件 ,IronPython中不支持Multiprocessing。

但是创建这样的模块是为了解决Python中的GIL,而IronPython没有,所以也许还有其他方法, 这个其他电子邮件建议使用.NET的ThreadPools

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM