On 8/29/05, Hans Dushanthakumar <[EMAIL PROTECTED]> wrote:
Thanks KentHow do I send a signal from the main thread to stop execution of a childthread?I tried the foll:, but got an error:Other than by this method, is there any other mechanism to stop athread?
import threadingimport timeclass shownum(
Hans Dushanthakumar wrote:
> Thanks Kent
>
> How do I send a signal from the main thread to stop execution of a child
> thread?
You have the right idea - set some kind of flag that the thread checks - but
you reused the name 'stop' so when you execute incr_num_thread.stop() you are
retrieving t
Oops - the error was probably due to using 'stop' as a method name.
:)
-Original Message-
From: Hans Dushanthakumar
Sent: Tuesday, 30 August 2005 2:18 p.m.
To: tutor@python.org
Subject: Killing a thread from main - was RE: [Tutor] "Lock"ing threads
Thanks Kent
How do I send a signal
Thanks Kent
How do I send a signal from the main thread to stop execution of a child
thread?
I tried the foll:, but got an error:
Other than by this method, is there any other mechanism to stop a
thread?
import threading
import time
class shownum(threading.Thread):
def __init__(self
Max Noel wrote:
On Feb 22, 2005, at 23:08, Bill Mill wrote:
If I recall correctly, there is not a direct way. Instead, you're
going to want to have your worker thread check a queue it shares with
the parent every so often to see if the supervisor thread has sent a
"quit" message to it.
Peace
Bill M
On Feb 22, 2005, at 23:08, Bill Mill wrote:
If I recall correctly, there is not a direct way. Instead, you're
going to want to have your worker thread check a queue it shares with
the parent every so often to see if the supervisor thread has sent a
"quit" message to it.
Peace
Bill Mill
bill.mill at
If I recall correctly, there is not a direct way. Instead, you're
going to want to have your worker thread check a queue it shares with
the parent every so often to see if the supervisor thread has sent a
"quit" message to it.
Peace
Bill Mill
bill.mill at gmail.com
On Tue, 22 Feb 2005 14:23:17 -
Hi,
Is there a way to terminate a thread from another
thread?
Shitiz
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Tutor maillist - Tutor@