Is it possible for thread to return value?
In my program, I use two threads, each thread makes a database connection and does a query. When two threads finish their query, the main thread combine the result.
Is there any way for the thread to return an array to main thread.
What I did is define the two thread class as innerclass in the mainthread, and in main thread I defined two arrays. In the threads' run function modify the two array. When two threads work finish, the main thread combine the result.
Is there any better way to do this? thanks.

