Using multiprocessing 2.6.2.1 package in Jython

烂漫一生 提交于 2019-12-05 23:16:58

You can't use it if multiprocessing requires C extensions i.e., if you can't disable them and the module was not reimplemented for Jython in Java/pure Python. multiprocessing module is included in the stdlib since Python 2.6. Current Jython supports Python 2.5.

There is no GIL in Jython so you can use threading in many cases where you would use multiprocessing in CPython.

A few years ago I spoke with the author of multiprocessing (Jesse Noller) about the sensibility of including a version of multiprocessing in Jython. His response was similar to the one J.F. Sebastian posted - The multiprocessing module is intended to be a drop in replacement for the threading module as a way to get around CPython's GIL. Since Jython has no GIL, it makes no sense to support multiprocessing.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!