Question Thread- Local Storage


New member
Aug 13, 2013
Programming Experience
Hi Team,
I have Task in Threading, The Scenario is:
i have a multiple threads and they are returning a value. i have to store each thread returned value, once all the thread is completed. finally i consolidated it store all thread value and make single string.
for that i'm using "Thread- Local Storage" concept. But i'm unable to achieve through coding,
Please suggest me is there any other concepts available or the above concepts are good to go
First of all, threads don't return anything. Methods can return something and methods are executed on a thread but threads themselves don't return anything.

Secondly, the whole point of thread local storage is that it's storage local to a thread. If you want to combine all the data into a single string then obviously more than one thread has to be able to see the data, so thread local storage is of no use to you. Just use a List<string> or the like.
Top Bottom