How to share a dictionary between multiple processes in python without locking

Posted by RandomVector on Stack Overflow See other posts from Stack Overflow or by RandomVector
Published on 2010-05-29T21:15:39Z Indexed on 2010/05/29 21:22 UTC
Read the original article Hit count: 141

Filed under:
|

I need to share a huge dictionary (around 1 gb in size) between multiple processs, however since all processes will always read from it. I dont need locking.

Is there any way to share a dictionary without locking?

The multiprocessing module in python provides an Array class which allows sharing without locking by setting
lock=false
however There is no such option for Dictionary provided by manager in multiprocessing module.

© Stack Overflow or respective owner

Related posts about python

Related posts about multithreading