vocab_thread2.start()
// And thread for saving tokenized data to putput file
write_thread = Thread(target=write_lines, args=(out_file, rows))
write_thread.start()
// Last vocab parts and last lines to write
vocab_thread1 = Thread(target=write_lines, args=(out_file, rows, True))
After Change
write_thread = Thread(target=write_lines, args=(out_file, rows))
write_thread.start()
rows = []
// Last vocab parts and last lines to write
vocab_thread1 = Thread(target=append_vocab, args=(rows, 1))
vocab_thread1.start()