Jul-27-2017, 10:00 PM
Thanks a lot [b]micseydel ! [/b]BTW, I have already fixed my code. Sorry, that I didn't update the thread. [Part of my code:]
# Queuing q = Queue.Queue(maxsize=0) lock = threading.Lock() # Lock the file while writing for 1 thread #Threading with open("filtered_devices") as my_file: for line in my_file: q.put(line) numofThreads = 20 for i in range (numofThreads): print "Threading Count No:%d" %i t = threading.Thread(target = queue_interfaces, args=(q,)) t.setDaemon(True) t.start() q.join()