Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8678843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:49:29+00:00 2026-06-12T20:49:29+00:00

How does the handler message queue work? I know for a fact that the

  • 0

How does the handler message queue work? I know for a fact that the message queue is tied to the thread it is initialized in. If i have 2 tasks(each download from the web), and I initiate an async task from the handler,one for each, will the 2 tasks be executed simultaneously?

I just need to understand, how the queue works..
could anyone please help! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:49:30+00:00Added an answer on June 12, 2026 at 8:49 pm

    First of all, AsyncTask can be executed only on the UI thread. So, even if you have two separate handlers (one for each AsyncTask) they should be both associated with the UI thread.

    Secondary, several AsyncTask instances may run either simultaneously or one by one. It depends on the API version. It is better to read documentation about this:

    public final AsyncTask execute (Params… params)

    Executes the task with the specified parameters.
    The task returns itself (this) so that the caller can keep a reference
    to it.

    Note: this function schedules the task on a queue for a single
    background thread or pool of threads depending on the platform
    version. When first introduced, AsyncTasks were executed serially on a
    single background thread. Starting with DONUT, this was changed to a
    pool of threads allowing multiple tasks to operate in parallel.
    Starting HONEYCOMB, tasks are back to being executed on a single
    thread to avoid common application errors caused by parallel
    execution. If you truly want parallel execution, you can use the
    executeOnExecutor(Executor, Params…) version of this method with
    THREAD_POOL_EXECUTOR; however, see commentary there for warnings on
    its use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given that I have a custom PHP error handler already, does it make sense
I have a rabbitmq queue subscriber that spins up a new thread every time
Does anybody know the trick, how to free control inside its event handler ?
How does printf handle its arguments? I know that in C# I can use
If the handler was instantiated in the main UI thread, does a post with
We have an Audit Message Handler and if any exceptions are thrown within this
Why does an event handler never get called if it's added within a loop
How does jquery handle event assignment when it comes to assigning the same handler
How does async JMS work? I've below sample code: public class JmsAdapter implements MessageListener,
I have a website written in PHP (CakePHP) where certain resource intensive tasks are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.