How can I pass a specific value/parameter to my thread code? For instance, I've got 10 files of the same type I want my app to process. I make 10 threads and want each thread to work on a file. The files are named:
When I create my 10 threads in a For loop, I simply want to be able to pass my loop index # to the created thread - and within that thread I will simply read that value, and access and process the appropriate file.
Is this possible? I don't see any way to just pass a plain old integer value to a thread when it gets created.