En Thu, 28 Jan 2010 10:25:30 -0300, Richard Lamboj
escribió:
which Method is better to kill a Thread? Using Thread Events, or a
raising a
Exception? Maybe someone has a small example for me?
The best way is simply NOT to do that. You don't kill a thread, you ask it
to commit suicide. T
Hello,
which Method is better to kill a Thread? Using Thread Events, or a raising a
Exception? Maybe someone has a small example for me?
Kind Regards,
Richi
--
http://mail.python.org/mailman/listinfo/python-list
Op 2006-06-10, Carl J. Van Arsdall schreef <[EMAIL PROTECTED]>:
> Felipe Almeida Lessa wrote:
>> Em Sex, 2006-06-09 às 13:54 -0700, Manish Marathe escreveu:
>>
>>> On 6/9/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>>> Manish Marathe wrote:
>>>
>>> > I am creating threa
MacDonald wrote:
>> I'm not sure using a non-portable API to run the code under a "custom
>> debugger" qualifies as a "portable implementation", though...
>
> Everything used is a part of the standard library, which is portable,
> AFAICT. Could you say specifically what is non-portable?
from the
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> >> it cannot be done in a portable way, so that's not very likely.
>
> > def __run(self):
> > """Hacked run function, which installs the trace."""
> > sys.settrace(self.globaltrace)
> > self.__run_backup()
> > self.run = self.__r
> Python uses the underlying OS thread implementation. It does _not_ spawn
> new threads.
Obviously that was meant to be "spawn processes"
Diez
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
>> it cannot be done in a portable way, so that's not very likely.
> def __run(self):
> """Hacked run function, which installs the trace."""
> sys.settrace(self.globaltrace)
> self.__run_backup()
> self.run = self.__run_backup
I'm not sure using a non-p
Fredrik Lundh wrote:
> Carl J. Van Arsdall wrote:
>
> > Are there any plans in the future to add the capability to kill threads
> > from the outside?
>
> it cannot be done in a portable way, so that's not very likely.
>
import sys, trace, threading
class KThread(threading.Thread):
"""A subclas
> Are there any plans in the future to add the capability to kill threads
> from the outside? Better yet, an interruptable thread so instead of
> using a polling loop you could send a DIE_THREAD_DIE signal or
> something. I think at present its not possible (or a really bad idea)
> to put sig
Carl J. Van Arsdall wrote:
> Are there any plans in the future to add the capability to kill threads
> from the outside?
it cannot be done in a portable way, so that's not very likely.
> I noticed that each python thread spawns a new interpreter
are you sure? what Python version and OS is th
Felipe Almeida Lessa wrote:
> Em Sex, 2006-06-09 às 13:54 -0700, Manish Marathe escreveu:
>
>> On 6/9/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>> Manish Marathe wrote:
>>
>> > I am creating threads using my self defined class which
>> inherits the
>>
Em Sex, 2006-06-09 às 13:54 -0700, Manish Marathe escreveu:
> On 6/9/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Manish Marathe wrote:
>
> > I am creating threads using my self defined class which
> inherits the
> > threading.Thread class. I want to know
On 6/9/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Manish Marathe wrote:> I am creating threads using my self defined class which inherits the> threading.Thread class. I want to know how can I kill the threads which> are being created by the object of my self defined class.
you cannot kill a threa
Manish Marathe wrote:
> I am creating threads using my self defined class which inherits the
> threading.Thread class. I want to know how can I kill the threads which
> are being created by the object of my self defined class.
you cannot kill a thread "from the outside"; you have to design your
Hello,
I am creating threads using my self defined class which inherits the
threading.Thread class. I want to know how can I kill the threads which
are being created by the object of my self defined class.
Thanks
-- Manish MaratheSpikeSource, Inc.http://developer.spikesource.com
--
http://mail.p
15 matches
Mail list logo