I have some tasks that I need to handle at the same time on Android, and I would like to use some kind of thread pool for this. I could not find in the documentation what actually happens "behind the scenes" when running AsyncTask using AsyncTask.THREAD_POOL_EXECUTOR.
My question is: what am I losing using AsyncTasks with AsyncTask.THREAD_POOL_EXECUTOR, as opposed to implementing custom ThreadPool with Runnables? (Let's talk about the cell).
I understand that the question is pretty general, but I'm pretty new to concurrent programming (besides AsyncTask itself). I'm not looking for a parallel programming tutorial! I just want to understand how a specific AsyncTask.THREAD_POOL_EXECUTOR differs from Android. I think the explanation will be useful to others in the future, as they weigh the pros and cons of choosing to use AsyncTask vs Thread / Runnable. Thanks in advance!
AsyncTasks . , , - . AsyncTasks api 11, .
, - , , , ..
, :
http://androidxref.com/4.4.3_r1.1/xref/development/samples/training/bitmapfun/BitmapFun/src/main/java/com/example/android/bitmapfun/util/AsyncTask.java
- , AsyncTasks, HandlerThreads, IntentServices ..
, AsyncTasks UI (, ), , AsyncTask , .
, , - runnings. , .
HandlerThreads , Looper . - , ? , Runnables, Executors, .
IntentServices - , , . , , , ( , , ..)
Source: https://habr.com/ru/post/1546019/More articles:Why keep a kernel stack for every process on Linux? - stackKibana - Get List of All Indexes - elasticsearchHow to use decorator in observer pattern for Python 2.7 - pythonUsing the << operator to write to a file and cout - c ++Как использовать SearchBox в Windows 8.1, загружая результаты с помощью метода асинхронизации - c#Учитывая объект, который является массивом значений enum, как я могу получить Enum [], не зная тип перечисления - c#Creating a large PDF file from a huge amount of data - javaChange src-data to src via jquery - javascriptWindows 8.1 Phone BackPressed not working properly - windows-phone-8.1How super () works in the constructor - javaAll Articles