Message284661
After spending a lot of time trying to understand why my code will not execute as expected and after not getting any help from StackOverflow:
http://stackoverflow.com/questions/41444081/python-multiprocessing-manager-delegate-client-connection-and-dont-wait
I assumed that it may be a possible glitch in the interaction of a thread and a multiprocessing manager.
I have tried this in Python 2.7.13 and Python 3.6.0 and assume the problem still exists in between and beyond.
The problem appears when I try to delegate the connect() method of a multiprocessing manager client to a thread. The first time the procedure takes place, everything works fine and there is no problem of shared memory or anything. The problem arises on the second and forth trials of connect, when there seems to be a memory sharing problem. To reproduce the problem you have to run the server.py and client.py modules. You can see that the client is capable of populating the server's queue. If you terminate the server.py process and start it again, the client can no longer reassign the remote queue. Actually, reconnecting to the server always take place, as well as the correct linkage to the remote queue on line 53 of bridge.py:
self.items_buffer = self.remote_manager.items_buffer()
but the problem is that this procedure no longer works after the first time. Even though the connection is re-established, and at the moment of reconnection it is possible to send info to the server, whenever the thread dies, the pipe gets somehow broken. |
|
Date |
User |
Action |
Args |
2017-01-04 19:19:03 | luke_16 | set | recipients:
+ luke_16 |
2017-01-04 19:19:03 | luke_16 | set | messageid: <1483557543.41.0.26156873729.issue29158@psf.upfronthosting.co.za> |
2017-01-04 19:19:03 | luke_16 | link | issue29158 messages |
2017-01-04 19:19:03 | luke_16 | create | |
|