Of course I know about cancel(). When I mentioned the use of "get(long
timeout, TimeUnit unit)", I thought it would be obvious that I would
then invoke cancel() to terminate my overly-long-running task. But
then, my UI thread would block while I'm waiting, as I stated above,
which is not desirable. Nor is the fact that the done() method of
AsyncTask's contained FutureTask object also calls get().

I asked what is the Android-approved, canonical method for doing what
I want to do. Given that AsyncTask is not the intended mechanism for
invoking and optionally timing out a long-running task, what *is* the
recommended method for doing so in Android?

Thanks again, in advance.


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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to