Re: process/thread instances and attributes

2009-01-16 Thread Jesse Noller
On Thu, Jan 15, 2009 at 10:37 PM, James Mills prolo...@shortcircuit.net.au wrote: After some work ... I've taken Laszlo's suggestion of using Value (shared memory) objects to share state between the -pseudo- Process (manager) object and it's underlying multiprocessing.Process instance (and

Re: process/thread instances and attributes

2009-01-16 Thread James Mills
On Fri, Jan 16, 2009 at 10:33 PM, Jesse Noller jnol...@gmail.com wrote: (...) Personally, rather then using a value to indicate whether to run or not, I would tend to use an event to coordinate start/stop state. The reason I implemented workers.Thread and workers.Process this way is basically

Re: process/thread instances and attributes

2009-01-15 Thread Laszlo Nagy
Hey all, I have this concept I'm working on and here is the code... Problem is if you run this it doesn't terminate. I believe you can terminate it in the main process by calling a.stop() But I can't find a way for it to self terminate, ie: self.stop() As indicated by the code... I'm not

Re: process/thread instances and attributes

2009-01-15 Thread James Mills
On Thu, Jan 15, 2009 at 7:36 PM, Laszlo Nagy gand...@shopzeus.com wrote: (...) Value won't do obviously :) As there could be an arbitary no. of processes. What do you want to try with this example? I guess I just am confused as to what belongs to which process (the main or the child) ... I

Re: process/thread instances and attributes

2009-01-15 Thread James Mills
After some work ... I've taken Laszlo's suggestion of using Value (shared memory) objects to share state between the -pseudo- Process (manager) object and it's underlying multiprocessing.Process instance (and subsequent process): Here is the code:

process/thread instances and attributes

2009-01-14 Thread James Mills
Hey all, I have this concept I'm working on and here is the code... Problem is if you run this it doesn't terminate. I believe you can terminate it in the main process by calling a.stop() But I can't find a way for it to self terminate, ie: self.stop() As indicated by the code...