AsyncTasks could indeed be overkill for what you want. Also, the 
implementation of AsyncTask is at the mercy of Google. Currently, from 
version 1.6 and up, it uses a thread-pool of more than one thread. However, 
there is talk of reducing this thread-pool to only one thread. This may 
cause dead-lock issues in your app if you rely on the pool having more than 
one thread.

If you want to be able to schedule your tasks (or futures) in a different 
way (e.g. use a PriorityBlockingQueue instead of a standard BlockingQueue) 
or have your own thread-implementations be part of the thread-pool or want 
to be sure to have an *x*-number of threads in your thread-pool, you should 
use the java.util.concurrent.Executors related classes.

If you want have different pools for different sets of tasks, you should use 
Executors related classes (be sure not to create too many threads in your 
process, though).

With version of AsyncTask in api-level 11 and up, you can call 
executeOnExecutor with your own Executor, which may give you the best of 
both worlds :)

-- 
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

Reply via email to