On 03/23/2011 08:27 AM, TreKing wrote:
On Wed, Mar 23, 2011 at 10:16 AM, Tobiah <[email protected]
<mailto:[email protected]>> wrote:
What does that argument really do then?
AsyncTask manages a thread to do it's work. According to the doc
comment, it probably calls interrupt()
<http://developer.android.com/reference/java/lang/Thread.html#interrupt()>
on the thread, which, according to the docs, doesn't really do much
unless the thread is in an "interruptible state". If your task is
chugging along, the thread won't be interrupted. So cancel(true) is
fairly pointless unless your thread is sitting around waiting for something.
The task looks like this:
while(true):
quickly_do_something()
sleep(1000)
So, it is "waiting" in a sense because of the sleep, but
maybe you mean something else by "waiting"?
Thanks,
Tobiah
--
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