469,338 Members | 8,424 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,338 developers. It's quick & easy.

Re: Sharing common memory space (In form of List) across the pythonprocesses.



Piyush Chechani wrote:
>
Hi,

I am working on a module where I need to share contents of a big List
across the processes. I am using socket programming concept for this.

My current processing for this is as follows: -
1. There is a server program S which loads the list in the
memory, and listens on a particular port,
2. All the other programs which want to access that list sends a
request on that server port,
3. Server sends the id of the memory loaded list element to the
requesting process.
Here I am getting a problem in the reverse function of id(), as my
client should get the list object using its id but I don't know the
python function for doing this.
There intentionally is no such function. If by 'process', I believe you
should just send the object, which actually just sends an internal
reference to the object. If you mean OS process, look into interprocess
communication. 3.0 has a new multiprocessing module that might help.
Or have your server perform manipulations on the object.

Aug 1 '08 #1
0 879

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dhanvi | last post: by
1 post views Thread by Dave Booker | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.