I have a python program that opens a socket and pulls the ssl cert. It works great but when I run it against a certain IP range the program does not proceed past thread 140. Is there a way to see why its not proceeding?
This is the threading portion of the program
createdThreads = 0
threadSplit = len(self.IP_list) / 5
#Splitting the work up between the threads
thread_1_list = self.IP_list[0:threadSplit]
thread_2_list = self.IP_list[threadSplit:(threadSplit*2)]
thread_3_list = self.IP_list[(threadSplit*2):(threadSplit*3)]
thread_4_list = self.IP_list[(threadSplit*3):(threadSplit*4)]
thread_5_list = self.IP_list[(threadSplit*4):(threadSplit*5)]`
thread_6_list = self.IP_list[(threadSplit*5):]
threadList = []
for address in range(threadSplit):
thread_1 = getCertInfo(thread_1_list[address],self)
thread_2 = getCertInfo(thread_2_list[address],self)
thread_3 = getCertInfo(thread_3_list[address],self)
thread_4 = getCertInfo(thread_4_list[address],self)
thread_5 = getCertInfo(thread_5_list[address],self)
thread_1.start()
thread_2.start()
thread_3.start()
thread_4.start()
thread_5.start()
thread_1.join()
thread_2.join()
thread_3.join()
thread_4.join()
thread_5.join()
if address == threadSplit-1:
for address in range(len(thread_6_list)):
thread_6 = getCertInfo(thread_6_list[address],self)
thread_6.start()
thread_6.join()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…