Answers

Question and Answer:

  Home  Android Developer

⟩ Explain me difference between AsyncTasks & Threads?

☛ Thread should be used to separate long running operations from main thread so that performance is improved. But it can’t be cancelled elegantly and it can’t handle configuration changes of Android. You can’t update UI from Thread.

☛ AsyncTask can be used to handle work items shorter than 5ms in duration. With AsyncTask, you can update UI unlike java Thread. But many long running tasks will choke the performance.

 165 views

More Questions for you: