Re: Killing subservient threads

2009-03-12 Thread Aahz
In article mailman.372.1235151060.11746.python-l...@python.org, Christian Heimes li...@cheimes.de wrote: Gabriel Genellina wrote: 1) make the child window set a flag in the thread (let's say, t.terminate = True). And make the polling thread check the flag periodically (you possibly already

Killing subservient threads

2009-02-20 Thread jimzat
I am trying to create an app which will have a main window from which the user will launch other (children) windows. When I launch the child window I start a new thread which periodically polls another device and updates the child window accordingly. When I dismiss the child window the polling

Re: Killing subservient threads

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 14:47:27 -0200, jimzat jim...@iname.com escribió: I am trying to create an app which will have a main window from which the user will launch other (children) windows. When I launch the child window I start a new thread which periodically polls another device and updates the

Re: Killing subservient threads

2009-02-20 Thread koranthala
On Feb 20, 9:47 pm, jimzat jim...@iname.com wrote: I am trying to create an app which will have a main window from which the user will launch other (children) windows. When I launch the child window I start a new thread which periodically polls another device and updates the child window

Re: Killing subservient threads

2009-02-20 Thread Christian Heimes
Gabriel Genellina wrote: 1) make the child window set a flag in the thread (let's say, t.terminate = True). And make the polling thread check the flag periodically (you possibly already have a loop there - just break the loop when you detect that self.terminate became true)

Re: Killing subservient threads

2009-02-20 Thread jimzat
On Feb 20, 11:22 am, koranthala koranth...@gmail.com wrote: thread.setDaemon(True) Makes it a daemon thread which means that interpreter will not stay alive if only that thread is alive. My main window is used to launch multiple children and therefore when one is dismissed the interpreter

Re: Killing subservient threads

2009-02-20 Thread jimzat
On Feb 20, 11:21 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: 1) make the child window set a flag in the thread (let's say, t.terminate   = True). And make the polling thread check the flag periodically (you   possibly already have a loop there - just break the loop when you detect  

Re: Killing subservient threads

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 16:15:10 -0200, jimzat jim...@iname.com escribió: I am using the thread module and calling thread.start_new_thread (...). If I use t=thread.start_new_thread(...) and later set t.terminate, I get AttributeError: 'int' object has no attribute 'terminate' Use the threading