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

  • Home
  • SEARCH
  • 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 6609715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:45:02+00:00 2026-05-25T19:45:02+00:00

Once an AsyncTask call is finished is the thread deleted? I stored an AsyncTask

  • 0

Once an AsyncTask call is finished is the thread deleted?

I stored an AsyncTask in a var “guiThread = (GUIAsyncTask) new GUIAsyncTask()”.
The first call to execute() works but subsequent calls don’t.
So, do I just create new tasks whenever I need them? I was under the impression that I used my variable over and over and calling new over and over would spin up thousands/millions of threads.

  • 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-05-25T19:45:02+00:00Added an answer on May 25, 2026 at 7:45 pm

    AsyncTasks are one-time uses. They start, execute, then die. Then you have a choice of keeping the reference around to gather information from it that may be stored in the class post-execute, or dumping the reference and letting the garbage collector handle it. If you want to start the AsyncTask again, you have to create a new object and start it.

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

Sidebar

Related Questions

When I try to execute an AsyncTask from a button click, my app says
Is there any way to prevent the doInBackground method/thread of an AsyncTask from starting
I have a database component that relies on AsyncTask to retrieve data. Once used
Once again a very beginner-ish question, but here I go: I would like to
I have an AsyncTask in a activity that i only want to run once
Why can an AsyncTask perform only one job? For example, task = new SubAsyncTask(...);
Can an AsyncTask be cancelled while completing onPostExecute() ? Or is it that once
I have a backgorund thread that extends AsyncTask and which I use in activity
I'm currently working with an async task that parses a JSON string. Once the
Once again, I'm at a loss with IE7 on this one. I'm making a

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.