how many threads are created by asynctask in android?
Answers
Answered by
0
Async tasks generally have three methods:
1-onPreExecute: This one runs in UI thread.
2-doInBackground : This runs in a worker thread.
3-onPostExecute: This one again runs on UI thread.
1-onPreExecute: This one runs in UI thread.
2-doInBackground : This runs in a worker thread.
3-onPostExecute: This one again runs on UI thread.
Answered by
1
Answer:Asynctask generally have 3 threads in Android:-
Explanation: 1.onPreExecute- This system is runned by a UI thread.
2. doInBackground- This is runned by a worker thread.
3. onPostExecute- This system also runs on UI thread.
But you should remember that all async tasks runs on the same background step like doInBackground step. Which means if two tasks are being performed together, second task can not be completed until first one gets complete.
Similar questions