Re: Interrupt python thread

2008-08-30 Thread Dieter Maurer
En Mon, 25 Aug 2008 05:00:07 -0300, BlueBird <[EMAIL PROTECTED]> escribi╴: > Unfortunately, this does not map very well with my program. Each of my > threads are calling foreign code (still written in python though), > which might be busy for 1 to 10 minutes with its own job. > > I wanted something

Re: Interrupt python thread

2008-08-25 Thread Gabriel Genellina
En Mon, 25 Aug 2008 05:00:07 -0300, BlueBird <[EMAIL PROTECTED]> escribi�: On Aug 24, 8:35 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:         The only safe way to "abort" a thread is by having it exit on its own. This means one needs a means of setting an attribute that each thread pe

Re: Interrupt python thread

2008-08-25 Thread BlueBird
On Aug 24, 8:35 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 24 Aug 2008 01:48:46 -0700 (PDT), BlueBird > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > Whenever an exception occurs, in the master thread or in one of the > > slave threads, I would like to i

Re: Interrupt python thread

2008-08-25 Thread janislaw
On 24 Sie, 10:48, BlueBird <[EMAIL PROTECTED]> wrote: > > Whenever an exception occurs, in the master thread or in one of the > slave threads, I would like to interrupt all the threads and the main > program. Threading API does not seem to provide a way to stop a > thread, is there anyway to achiev

Re: Interrupt python thread

2008-08-24 Thread Fredrik Lundh
James Matthews wrote: def __stop(self): self.__block.acquire() self.__stopped = True self.__block.notifyAll() self.__block.release() have you tried using that method? what happened? looking at the code, what do you think it does? -- http://mail.python

Re: Interrupt python thread

2008-08-24 Thread James Matthews
def __stop(self): self.__block.acquire() self.__stopped = True self.__block.notifyAll() self.__block.release() On Sun, Aug 24, 2008 at 11:59 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote: > James Matthews wrote: > > Group all the threads in a list and call the st

Re: Interrupt python thread

2008-08-24 Thread Fredrik Lundh
James Matthews wrote: Group all the threads in a list and call the stop method on all of them. what stop method? -- http://mail.python.org/mailman/listinfo/python-list

Re: Interrupt python thread

2008-08-24 Thread James Matthews
Group all the threads in a list and call the stop method on all of them. On Sun, Aug 24, 2008 at 1:48 AM, BlueBird <[EMAIL PROTECTED]> wrote: > Hi, > > I have a program with a master thread and several slave threads. > > Whenever an exception occurs, in the master thread or in one of the > slave

Interrupt python thread

2008-08-24 Thread BlueBird
Hi, I have a program with a master thread and several slave threads. Whenever an exception occurs, in the master thread or in one of the slave threads, I would like to interrupt all the threads and the main program. Threading API does not seem to provide a way to stop a thread, is there anyway to