当我试图使用~threading module~开发一个并行python应用程序时,我得到以下错误
Python Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)"
我使用的是python3.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()
目前没有回答
相关问题 更多 >
编程相关推荐