I understand the use of locals and types and all that, that part is obvious. What I was asking is how to make sure a specific thread is referencing a specific type or array or index, even when it's doing exactly the same tasks with the same code as other threads. Obviously if I run a thread which calls MyFunction(), and that function does some processing which accesses a Global called MyGlobal, then other threads that call MyFunction are also going to be accessing MyGlobal, which is not what I want to happen. I want each thread to access a unique global which is somehow associated with that thread and only that thread, even though it's globally accessible data. (it must be global but just not used by every thread).
You spoke about passing in an object - I understand that object can't be just an Integer, it has to be a custom type. So if I pass it a custom type, how would the functions executed by that thread access that instance of that custom type?
You spoke about passing in an object - I understand that object can't be just an Integer, it has to be a custom type. So if I pass it a custom type, how would the functions executed by that thread access that instance of that custom type?