user2759617
user2759617

Reputation: 707

If I have multiple AsyncTasks lined up, will the first one complete first?

Example I have a layout with a list and an image at the top of the list. I have CursorAdapters for both of them that load this data from a service. Since android has one UI thread and all the other background AsyncTasks run on one thread, does that mean whichever one I call first, finishes first?

Upvotes: 0

Views: 26

Answers (1)

Gennadii Saprykin
Gennadii Saprykin

Reputation: 4573

Yes it does. By default AsyncTasks go to one queue because they use serial executor. If you want them to execute in parallel you should use your own ThreadPoolExecutor instead.

Upvotes: 2

Related Questions