I am developing Android, but the question may be just as correct on any other Java platform.
I developed a multithreaded application. Suppose I have a first class that must perform a laborious task, so this work is done in a different thread. When this is done, the same thread will return the result of setting the time to another (third) class.
This last class will do something and return the result to the first class. I noticed that the first class will wait all the time, maybe because it's some kind of cycle?
In addition, I would like the Thread class to stop, because in the case when it passed the result, the third class should just stop. The third class should work without being "encapsulated" in the second class (Thread). Does anyone know how to do this?
right now the experience is that the first seems to be waiting (hanging) until the second and third: (
source
share