剑胆琴心

剑胆琴心

潜心学习,去成为你想成为的人

python-可重复利用的线程

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 import threading import queue class MyThread(threading.Thread): def __init__(self): super().__init__() self.queue = queue.Queue() self.daemon = True # 守护进程 self.start() # def run(self): # 只有run里的才
0%