multiprocessing: How do I share a dict among multiple processes?

后端 未结 5 495
执念已碎
执念已碎 2020-11-22 11:49

A program that creates several processes that work on a join-able queue, Q, and may eventually manipulate a global dictionary D to store results. (

5条回答
  •  北海茫月
    2020-11-22 12:49

    Maybe you can try pyshmht, sharing memory based hash table extension for Python.

    Notice

    1. It's not fully tested, just for your reference.

    2. It currently lacks lock/sem mechanisms for multiprocessing.

提交回复
热议问题