Gevent monkeypatching breaking multiprocessing

前端 未结 5 507
無奈伤痛
無奈伤痛 2020-12-05 04:55

I am attempting to use multiprocessing\'s pool to run a group of processes, each of which will run a gevent pool of greenlets. The reason for this is that there is a lot of

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 05:26

    Wrote a replacement Nose Multiprocess plugin - this one should play well with all kinds of crazy Gevent-based patching.

    https://pypi.python.org/pypi/nose-gevented-multiprocess/

    https://github.com/dvdotsenko/nose_gevent_multiprocess

    • Switches from multiprocess.fork to plain subprocess.popen for worker processes (fixes module-level erroneously shared objects issues for me)
    • Switched from multiprocess.Queue to JSON-RPC over HTTP for master-to-clients RPC
    • This can now theoretically allow tests to be distributed to multiple machines

提交回复
热议问题