I have 2 AsyncTask, one which is creating a socket connections and anotherone that is transmitting objects using those sockets. my code is this:
try {
I hated it when HONEY COMB changed the multiple AsyncTask execution from concurrent to sequential. So every time I execute an AsyncTask, I do something like this.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
task.execute();
}
But the thread pool size is 5, if you add the sixth task, it will be added in a queue, and will not be executed until one of the 5 thread has finished.