MultiThreading question
Posted
by
TiGer
on Stack Overflow
See other posts from Stack Overflow
or by TiGer
Published on 2011-01-04T10:44:10Z
Indexed on
2011/01/04
11:53 UTC
Read the original article
Hit count: 165
android
|multithreading
Hi, I am developing on Android but the question might be just as valid on any other Java platform. I have developed a multi-threaded app. Lets say I have a first class that needs to do a time-intensive task, thus this work is done in another Thread. When it's done that same Thread will return the time-intensive task result to another (3rd) class. This last class will do something and return it's result to the first-starting class. I have noticed though that the first class will be waiting the whole time, maybe because this is some kind of loop ? Also I'd like the Thread-class to stop itself, as in when it has passed it's result to the third class it should simply stop. The third class has to do it's work without being "incapsulated" in the second class (the Thread one). Anyone knows how to accomplish this ? right now the experience is that the first one seems to be waiting (hanging) till the second and the third one are done :(
© Stack Overflow or respective owner