How do I return a value from a thread?
A thread isn't a method - you don't normally "return" a value.
However, if you're trying to fetch a value back from the results of some processing, you have many options, the two main ones being:
It really depends on how you're creating the thread, and how you want to use it, as well as the language/framework/tools you're using.