Which AsyncTask should I use behind SERIAL_EXECUTOR in Android -


i retrieving created data in user controls. , there 3 spinners using serial_executor execute 1 one. now, issue that, 1 spinner retrieves data based on spinner.

asynctask executor should use spinner can load data although serial_executor going on.

in short, want know asynctask should use execute task though serial_executor in process.

if want execute asynctask parallel 1 can use thread_pool_executor this:

asynctask task = new someasynctask(); task.executeonexecutor(asynctask.thread_pool_executor); 

but warn might not work might like. if asynctasks executing perform quite bit of work on own executing them in parallel slow them down considerably. if possible, try execute tasks serially, execute in parallel if absolutely have to. if need load data dependent on other kind of data consider doing in 1 big asynctask instead of splitting work to asynctasks. try keep amount of asynctasks or threads minimum. fewer have faster app load.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

how to receive file in java(servlet/jsp) -