Jun-12-2022, 07:57 AM
Hello,
I have a funtion with a for loop, and i would like that the loop will be process faster and to make each loop run by a process so that it will be parallel.
what is the best way to do it in python.
would be glad to have examples.
thank you.
(i have tried lambda but it seems that my code doesn't match to use it)
I have a funtion with a for loop, and i would like that the loop will be process faster and to make each loop run by a process so that it will be parallel.
what is the best way to do it in python.
would be glad to have examples.
thank you.
(i have tried lambda but it seems that my code doesn't match to use it)
def myloop(): for HourLoop in HourLoopRange: app.BarP(HourLoop,len(HourLoopRange)) root.update_idletasks() if bug==1: start2 = time.time() if bug==1: app.enter_text("%f\n" % (time.time() - start2)) LOAD_CH (HourLoop,loads,iarray,load,carray,iarray99Cap,load99) if bug==1: app.enter_text("%f\n" % (time.time() - start2)) MACH_CH (HourLoop,machs,Miarray,rarray,McarrayID,Mcarray,MiarrayOW[0]) if bug==1: app.enter_text("%f\n" % (time.time() - start2)) STORAGE_CH(HourLoop,machs,Miarray,rarray,McarrayID,Mcarray,MiarrayOW[0]) SOF(HourLoop)