Message284674
There are too many things going on in this example -- it would be far easier to digest if the example could be simplified.
The general programming rule of thumb (completely unrelated to but still just as relevant to Python) that I think David might have been invoking is: create processes first then create threads inside of them. Otherwise, if you fork a process that has multiple threads going inside it, you should expect problems. Assuming you're on a unix platform, it looks like you're creating threads then forking a process as well as doing it the other way around in another part of your code.
Different topic: you mention killing the main process for server.py... which would likely kill the manager process referred to by shared_objects_manager... but you're creating a different manager process in bridge.py that is told to listen on the same port...
Without pulling apart your code further, I suspect confusion over how to use a Manager to share objects / data / information across processes. If it helps, generally one process creates a manager instance (which itself results in the creation of a new process) and then other processes / threads created are created by that first process and given a handle on the manager instance or the objects managed by that manager. I am a bit confused by your example but I hope that explanation helps provide some clarity? |
|
Date |
User |
Action |
Args |
2017-01-04 22:20:30 | davin | set | recipients:
+ davin, r.david.murray, luke_16 |
2017-01-04 22:20:29 | davin | set | messageid: <1483568429.93.0.672176364752.issue29158@psf.upfronthosting.co.za> |
2017-01-04 22:20:29 | davin | link | issue29158 messages |
2017-01-04 22:20:29 | davin | create | |
|