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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:10:51+00:00 2026-06-02T23:10:51+00:00

In my case, I am needing to obtain some data from the network, process

  • 0

In my case, I am needing to obtain some data from the network, process it and then get other data from the network based on the result of the first network query.
However, the first query could produce the need for user intervention … or not.

I understand how AsyncTask can run and then display it’s result in a UI object.
However, how should I “chain” actions together so that the first AsyncTask derived object correctly dies before starting a new action.

My thought is that when onPostExecute is called, if I start another UI based action, it will not terminate until the UI based action has terminated.

Is there a correct way to finish an AsyncTask process, signal the result to the calling object, clean up, calling object can then do its own processing ?

Or am I fussing about nothing here ?


EDIT : Please note my question is about AsyncTask background processing and how to correctly use it to avoid an execution stack overflow. I am not asking if I should use this method.

  • 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-02T23:10:52+00:00Added an answer on June 2, 2026 at 11:10 pm

    The best way to do this I found, after a good amount of searching, is to use message handlers.
    This means that, at the end of the threads action it posts a message with the result to the UI code (not a UI widget note) and then can terminate cleanly.

    This means a light and simple implementation.

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

Sidebar

Related Questions

I am needing to log some xml data (which is currently a JDOM Document),
I seem to be needing to re-order my result set after i make some
Is C# true to C++, needing a break; per case: ? .. Default is
I find myself needing to call back into the JVM from arbitrary native threads
I have tried following some tutorials and I get the concept of how the
I'm wondering what should be done in the case of needing Roles or Traits
I'm writing a localStorage wrapper to make inserting and retrieving data easier when needing
On a current project at I am needing to do some pagination of results
Case : I'm creating a desktop application with VB.NET (Windows Forms), and using SQL
case i of 0..99 : Function-call('bobo') ; 100..209 : function-smell('Hobo'); 210..300 : function-yikes('argh'); end;

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.