Stop on threads I believe is deprecated. It probably doesn't do
anything. Just use a global flag that the thread can check and exit if
it's set. Most reliable way right now.


On Dec 9, 7:15 pm, Richard Zhao <[email protected]> wrote:
> My problem is:
> Activity A called Activity B, and in Activity B, it start a background
> thread to do some client-server work. But it maybe takes too much
> time. So i add a cancel button to call the stop() method to stop the
> thread, and call finish() to finish the Activity B and go back to
> Activity A. Although it is back to Activity A, the thread isn't stop
> immediately.
>
> Can i just call the finish() to go back to Activity A, and leave the
> thread to exit by itself?
> If it is not the right way, which is?
>
> Thanks for any help.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to