is it a bug?

Mr Shore shore.cloud at gmail.com
Sun Jan 27 11:21:20 EST 2008


import threading
import time
class timer(threading.Thread):
    def __init__(self,no,interval):
        threading.Thread.__init__(self)
        self.no=no
        self.interval=interval

    def run(self):
        while True:
            print 'Thread Object (%d), Time:%s'%(self.no,time.ctime())
            time.sleep(self.interval)

def test():
    threadone=timer(1,1)
    threadtwo=timer(2,3)
    threadone.start()
    threadtwo.start()
    print 'main thread'

if __name__=='__main__':
    test()
when I run the above programme,an error comes out but ignored
Exception exceptions.AttributeError: '_shutdown' in <module 'threading' from
'F:
\Python25\lib\threading.pyc'> ignored
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080128/a4b457e6/attachment.html>


More information about the Python-list mailing list