看板 [ Python ]
討論串[問題] 關於threading restart
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者hl4 (Minimi)時間15年前 (2010/05/17 00:22), 編輯資訊
0
0
0
內容預覽:
我大概懂了,你說的是像這樣吧?. import threading. class myThread(threading.Thread):. def __init__(self):. self.i = 1. threading.Thread.__init__(self). def start(self
(還有155個字)

推噓1(1推 0噓 5→)留言6則,0人參與, 最新作者hl4 (Minimi)時間15年前 (2010/05/16 21:19), 編輯資訊
0
0
0
內容預覽:
一個thread產生的時候,會依據參數執行 __init__. 然後可以以t.start()觸發,執行run(). 請問如果我想要同一個thread再執行一次t.start()或run(),我應該怎麼作. 直接t.start()似乎會產生錯誤. 謝謝. --. 發信站: 批踢踢實業坊(ptt.c
首頁
上一頁
1
下一頁
尾頁