Python怎么停止一个线程呢?小弟我这种方法对不对啊

Python如何停止一个线程呢???我这种方法对不对啊???
我现在的方法如下:

线程定义如下:
Python code

#Transmit and Recive
class TrThread(Thread):
    def run(self):
        self.doRecv =True
        while self.doRecv==True:
            rbuf = COM.read(1)          #read one, with timeout
            if rbuf:
                n = COM.inWaiting()
                if n:
                    rbuf = rbuf+COM.read(n)
                    RQueue.put(rbuf)
                    root.event_generate("<<COMRxRdy>>",when='tail')

            if TQueue:
                COM.write(TQueue.get())
            time.sleep(0.005)

    def stop(self):
        self.doRecv = False



在想要停止这个线程的地方做如下操作:
Python code

trcv=TrThread()
trcv.setDaemon(True)
...
...
...
trcv.stop()
trcv.join()



但是我发现程序会死在trcv.join()调用的地方,,,请问这是为什么呢???应该如何解决呢???

------解决方案--------------------
是不是等待串口数据导致线程自己sleep而没有机会执行,主线程的join没法继续,方法就是这样的,换成这个能执行
Python code
from threading import *
import time

class MyThread(Thread):
    def run (self):
        self.ifdo = True;
        while self.ifdo:
            print 'I am running...'
            time.sleep(0.1)

    def stop (self):
        print 'I will stop it...'
        self.ifdo = False;

tr = MyThread()
tr.setDaemon(True)
tr.start()
time.sleep(1)
tr.stop()
tr.join()

------解决方案--------------------
这样就更直观了
Python code
from threading import *
import time

class MyThread(Thread):
    def run (self):
        self.ifdo = True;
        while self.ifdo:
            print 'I am running...'
            time.sleep(2)

    def stop (self):
        print 'I am stopping it...'
        self.ifdo = False;

tr = MyThread()
tr.setDaemon(True)
tr.start()
print 'I will stop it...'
time.sleep(5)
tr.stop()
tr.join()

------解决方案--------------------
你的线程有stop方法,setDaemon(True)和join()都可以免了吧...