Hi I'm trying to allow simultaneous testing of multiple words but I'm facing troubles with multithreading! Is it possible to terminate all other threads if one succeeded? Maybe I don't understand threading correctly! Pretty confused! Here is my code:
def testPass(hash, dname):
dicFile = open(dname,'r')
for word in dicFile.readlines():
word = word.strip('\n')
t = Thread(target=verifyWord, args=(hash, word))
t.start()
return
so I want to do something like if one of the t succeeded exit the loop. I don't know how to handle this.