AsyncTask Threading Rule - Can it really only be used once?

Can someone verify this is an accurate interpretation?

That is a very accurate interpretation.


There is one more gotcha with AsyncTasks. Please note that in the example

new DownloadFilesTask().execute(url1, url2, url3);
new DownloadFilesTask().execute(url4, url5, url6);

executed on Android 3+ (API level 11, HONEYCOMB) url1 and url4 will not be downloaded in parallel. In particular, if contacting url1 is going to time out, the transfer on url4 will not even start until it times out. Unless you explicitly specify otherwise, all AsyncTasks are serviced by the same single worker thread.

The docs say:

Order of execution

When first introduced, AsyncTasks were executed serially on a single background thread. Starting with DONUT, this was changed to a pool of threads allowing multiple tasks to operate in parallel. Starting with HONEYCOMB, tasks are executed on a single thread to avoid common application errors caused by parallel execution.

If you truly want parallel execution, you can invoke executeOnExecutor(java.util.concurrent.Executor, Object[]) with THREAD_POOL_EXECUTOR.