Thanks for the prompt response Agus. So, this means that the documentation needs to be updated ?
On Mon, Dec 21, 2009 at 4:09 PM, Agus <[email protected]> wrote: > No you don't wait for the 1st to finish, just create another instance of > AsyncTask. The implementation of AsyncTask uses pooled threads > > On Mon, Dec 21, 2009 at 2:23 AM, Android Development > <[email protected]>wrote: > >> Hello, >> >> In the documentation, I read that it is not possible for executing 2 Async >> Tasks. If execute is called again, it should throw an exception. >> >> The following is given under the heading of "Threading Rules", and i >> quote: >> >> "The task can be executed only once (an exception will be thrown if a >> second execution is attempted.)" >> >> I wish to understand the meaning of this statement. >> >> Does this mean, that if i try and execute the same task twice >> (concurrently) when the first execution of the task was still going on...an >> exception will be thrown ? Will i need to wait for the completion of the >> first task, before i spawn a second task ? >> >> A possible use case: >> >> The user wishes to download a set of files. He clicks on the download >> button by providing the URL. When the first download is still going on, he >> wishes to download another file and provides another URL. Both these user >> actions are serviced by a DownloadTask, that extends the AysncTask. >> >> If i wish to change this default behavior, is there a configuration option >> ? >> >> -- >> 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]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- 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

