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 8465545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:04:52+00:00 2026-06-10T15:04:52+00:00

The API reference states, AsyncTasks should ideally be used for short operations (a few

  • 0

The API reference states,

AsyncTasks should ideally be used for short operations (a few seconds
at the most.)

Is the problem with a doInBackground that takes, say, 30 seconds that the thread pool might run out of threads? And if that’s the reason, would it cease to be a problem if I ensure my app will never have more than one such long running doInBackground executing concurrently?

  • 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-10T15:04:54+00:00Added an answer on June 10, 2026 at 3:04 pm

    I believe that AyncTasks are in general still tied to the foreground activity stack that spawned them, so that e.g. if an Activity spawns an AsyncTask, the user leaves the app, and then the OS is short of memory, it will kill the Activity’s process (including the still-running AsyncTask), and just expect you to restore the state and start over if the user resumes/returns to your app.

    For longer-running tasks, particularly the sort where there will only be only one or a few, you probably want a Service instead, because those can persist even when your app’s UI is shut down to save memory.

    Disclaimer: I haven’t done Android coding in awhile, so this answer may be out of date or based on a flawed understanding of how things work. I will remove this caveat if someone with more recent experience can comment to confirm; high-rep folks are welcome to just edit this paragraph away instead if they know this is correct.

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

Sidebar

Related Questions

[Update: I've found the API reference. The method used is below] <?php wp_delete_post( $postid,
I'm reading the Google Maps API and it states that the: callback: The function
On http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html it states that: Compares this URL for equality with another object. If
consulting the Facebook documentation on: http://developers.facebook.com/docs/reference/api/page/#tabs I saw that is possible change the tab
The foursquare venue search api documentation states that the limit parameter can go up
I'm looking to create an on-site API reference for my framework and application. Basically,
As title, I searched official google maps api reference and other site, I can't
Can I get the value of MotionEvent.getRawX()/getRawY() of other pointers ? MotionEvent.getRawX() api reference
http://developers.facebook.com/docs/reference/api/post/ In Comments -> Create section it says: You can write to the POST_ID/comments
I need someone help. When I open https://developers.facebook.com/docs/reference/api/ and clicked https://graph.facebook.com/me/likes?access_token=blablabla , I got

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.