On Sun, Jan 2, 2011 at 4:12 PM, Joan Pujol <[email protected]> wrote:
> Also .get() in AsyncTask makes some confusion to me, I initially expect to > be a synchronous solution that doesn't block the EDT like Foxtrot. > http://developer.android.com/reference/android/os/AsyncTask.html#get() "Waits if necessary for the computation to complete, and then retrieves its result." That pretty explicitly states that it blocks. <http://developer.android.com/reference/android/os/AsyncTask.html#get()> > Then my question is, what's the purpouse of .get(), someone can give some > good use of it? > The purpose, as described, is to block until the result is obtained. This could be useful, for example, if you have multiple tasks, where one uses another. One task could start another and call get() to wait for it to finish before continuing with its own work. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- 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

