当我尝试使用〜threading模块〜开发并行python应用程序时,出现以下错误
Python进程以退出代码139完成(被信号11中断: SIGSEGV)“
我正在使用python 3.6,Linux 16.04和Pycharm 2018
我不明白原因以及如何解决。
代码示例:
numOfThread = 8
class myThread (threading.Thread):
def __init__(self, thread_id, name, frames):
threading.Thread.__init__(self)
self.thread_id = thread_id
self.name = name
self.frames = frames
self.out_frame = None
def run(self):
print("Starting " + self.name)
self.out_frame = trackingmario(self.frames)
list_of_threads = []
print("Start.....\n")
for i in range(numOfThread):
list_of_threads.append(myThread(i, 'thread_'+str(i), lists[i]))
for i in range(numOfThread):
list_of_threads[i].start()
for ti in list_of_threads:
ti.join()