If I have a program like
Code: Select all
Procedure doSOMETHING(DATA$)
***code to dosomething**
ProcedureReturn DATA$
EndProcedure[
Procedure getURL(URL$)
***code to get url**
ProcedureReturn doSOMETHING(DATA$)
EndProcedure[
Procedure YourProcedure(*Value)
Repeat
getURL(Value)
Delay(1000)
ForEver
EndProcedure
CreateThread(@YourProcedure(), "SOMEURL")
CreateThread(@YourProcedure(), "SOMEOTHERURL")
My problem is that it sometimes seems one of the threads will overwrite the other when its running one of the procedures. How can I stop that from happening, but still allow them to run independently and not have to wait?
Hope someone understands what I am asking, and I didn't overcomplicate it.
Thanks