AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 43


An AsyncTask can be cancelled anytime from any thread.

Show Answer
Correct Answer: AB

An AsyncTask can be cancelled only if it is invoked from the main thread. This is because AsyncTask is tightly bound to the UI thread and its lifecycle. Cancelling an AsyncTask from a background thread is not guaranteed to work correctly and can lead to unpredictable behavior.

Discussion

1 comment
Sign in to comment
MmadiOption: A
Dec 31, 2022

A. True