I am trying to save an output of multiple threading to the variable Output_1
and Output_2
. My code is as follows.
import multiprocessing
from threading import Thread
from multiprocessing import Pool
import threading
import time
golbal_data = []
def job(R003_file_List):
...............skip..............
return Capex_date_DF
thread1 = threading.Thread(target = job(R003_file_List[0:4]))
thread1.start()
thread1.join()
Output_1 = thread1.result()
thread12 = threading.Thread(target = job(R003_file_List[5:8]))
thread2.start()
thread2.join()
Output_2 = thread12.result()
However, it shows the error 'Thread' object has no attribute 'result'
. Please help me to find the bug.