Nov-04-2022, 12:35 PM
Hi Team,
I want to use multi threading. on single csv files.
task one ----> create gzip of csv files
task two ------> Checksum no.generate check no.
Below is my attempted code, is this correct way of doing it.
I want to use multi threading. on single csv files.
task one ----> create gzip of csv files
task two ------> Checksum no.generate check no.
Below is my attempted code, is this correct way of doing it.
import threading class MyClass: pass def Create_checksum(path): print("checksum Created") def Create_gzip(path): print("gzip_Created") def main(): path = "d:\\output\\abc.csv" # Call Checksum Function to generate Checksum no data = MyClass t1 = threading.Thread(target=data.Create_checksum, args=(path,)) t2 = threading.Thread(target=data.Create_gzip, args=(path,)) t1.start() t2.start() t1.join() t2.join() # both threads completely executed print("Done!") if __name__ == "__main__": main()