I have a general question about multithreading...
I have a small app that is multithreaded. I have a main() class and a separate Runnable class that implements the Runnable interface. The problem I have is that the Runnable class needs to return an integer to main(). But this isn't possible because the run() method in my Runnable class is of type void, so no value can be returned.
I suppose I could move the code that returns a value to a new class that is not Runnable but is called inside the run() method, but I think that still leaves me with the same basic problem.
Is there a general approach or widely accepted practice to this problem? Just looking for a little guidance on how one should tackle this sort of problem.