简体   繁体   English

IronPython是否支持多处理?

[英]Does IronPython support multiprocessing?

Using IronPython 2.7 ( IronPython 2.7 2.7.5.0 on .NET 4.0.30319.42000 ), I have a script which includes from multiprocessing import Pool . 使用IronPython 2.7( IronPython 2.7 2.7.5.0 on .NET 4.0.30319.42000 ),我有一个包含from multiprocessing import Pool的脚本。 Trying to run it, I get the following error: 试图运行它,我收到以下错误:

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

Is it possible to use the multiprocessing module in IronPython? 是否可以在IronPython中使用multiprocessing模块? If not, is there another way to get this functionality? 如果没有,是否有另一种方法来获得此功能?

According to this e-mail there is no support of Multiprocessing in IronPython. 根据这封电子邮件 ,IronPython中不支持Multiprocessing。

But such module was created to workaround the GIL in Python, and IronPython don't have one, so maybe there are other ways, this other e-mail suggests using .NET's ThreadPools . 但是创建这样的模块是为了解决Python中的GIL,而IronPython没有,所以也许还有其他方法, 这个其他电子邮件建议使用.NET的ThreadPools

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

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