Ah.
In this case, calling cancel with "true" does make sense, as it will
make sleep() abort immediately with an InteruptedException.
However, the loop still need to check AsyncTask.isCancelled().
More info on interrupting threads can be found here:
http://developer.android.com/reference/java/lang/Thread.html#interrupt()
-- Kostya
25.03.2011 18:08, Tobiah пишет:
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
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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