23.03.2011 18:16, Tobiah пишет:
So I thought that by calling cancel(true), the task would be whacked.
What does that argument really do then?
According to the docs, calling cancel(true) causes the task's worker
thread to be interrupted.
See Thread.interrupt:
http://developer.android.com/reference/java/lang/Thread.html#interrupt()
Which, simplifying things somewhat, has a similar effect to just
cancel(false), in that the worker code still has to check for
interruption (just like async task has to check for cancellation).
In short - task.cancel(true) is not magic :)
--
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