Right now I am manually building parallel processors for multithreading. Tested, definitely 3x faster processing time. But I was wondering if there is an au3 function to auto output sections of code into sperate temporary .au3 files & then automatically compile them into .exes, use them for processing data then delete the temp .au3 file & .exes after processing that information?
Func FindProcessor($r,$ID)
;Debug("FindProcessor")
WriteTxt("ProcessID",$ID)
WriteTxt("ProcessRow",$r)
WriteTxt("Accepted",0)
Sleep(250)
For $i=1 To $MaxJobs
If ReadTxt("P"&$i)=0 Then
WriteTxt("P"&$i&"_NewJob",1)
;Debug("PID: "&$i&", ProcessID: "&$ID&", ProcessRow: "&$r)
Do
Sleep(250)
Until ReadTxt("Accepted")=1
Return 1
EndIf
Next
Return 0
EndFunc
Func LoadProcessors()
Debug("Loading Parallel Processors")
For $i=1 To $MaxJobs
WriteTxt("P"&$i,0)
WriteTxt("P"&$i&"_NewJob",0)
ShellExecute(@ScriptDir&"\Processor_"&$i&".exe")
Sleep(2000)
Next
EndFunc