This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author davin
Recipients davin, luke_16, r.david.murray
Date 2017-01-04.22:20:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483568429.93.0.672176364752.issue29158@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-01-04 22:20:30davinsetrecipients: + davin, r.david.murray, luke_16
2017-01-04 22:20:29davinsetmessageid: <1483568429.93.0.672176364752.issue29158@psf.upfronthosting.co.za>
2017-01-04 22:20:29davinlinkissue29158 messages
2017-01-04 22:20:29davincreate