定义线程类 import threading class myThread (threading.Thread): def __init__(self, proIdx): threading.Thread.__init__(self) self.proIdx = proIdx def run(self): solution(self.proIdx) solution方法需要实现 运行线程 a = scrawlerThread(i) a.start() a.join()