亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        Python RuntimeError: thread.__init__() not called解決方法

        字號(hào):


            這篇文章主要介紹了Python RuntimeError: thread.__init__() not called解決方法,需要的朋友可以參考下
            在寫(xiě)一個(gè)多線程類(lèi)的時(shí)候調(diào)用報(bào)錯(cuò)
            RuntimeError: thread.__init__() not called
            代碼如下:
            class NotifyTread(threading.Thread):
            def __init__(self, params):
            threading.Thread.__init__(self) #here。。。。。。
            self.params = params
            def run(self):
            print "start notify............"
            time.sleep(10)
            print notify_tran(self.params)
            print "end notify.............."
            在init中要先初始化Thread,然后在給參數(shù)賦值,就能解決了。
            也就是不能缺少
            threading.Thread.__init__(self)
            這是一個(gè)使用的注意地方。