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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:52:44+00:00 2026-06-11T10:52:44+00:00

I have some difficulties with asynchronous Tasks in different Applications and Languages. The typical

  • 0

I have some difficulties with asynchronous Tasks in different Applications and Languages.

The typical usage, as far as I understood it is something like:

asyncTask(x,y){
    //do something
}

alwaysRunWhenAsyncIsFinished(){
    //continue with the app has to 
    //happen here
}

...

mainProgramFunction(){
    asyncTask(5,6);
}

Well in this Case you have to write your Program until the async task happens, and when you have to call the asyncTask, you have to write the continuing Code in the Recall Function, which is the Function that always happens last after the async task.

Is there a possibility to write something like this:

asyncTask(x,y){
    //do something
}


...

mainProgramFunction(){
    asyncTask(5,6);

    continuingCode();//But happens AFTER asyncTask is done.
}

I don’t exactly know if this is possible or not. And maybe this is just possible with a specific sdk, which provides this kind of async task?

The last option could be that I didn’t really understand async tasks, and how to use them.

  • 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-11T10:52:46+00:00Added an answer on June 11, 2026 at 10:52 am

    Your

     Kick off a task
    
     Keep doing stuff
    

    model of program structure is supported by many programming languages. For example in Java one can have

     Runnable myRunnable = new MyRunnable();
    
     new Thread(myRunnable).start();
    
     doSomeMore();
    

    However this can get a bit messy. You’re firing off threads, which presumably may run for an indefinite period of time, so your “main line” may reach its end while the threads are all off doing work. You’ve got no “supervisory” thread to keep track of that work. Worse, you might end up firing off an excessive number of threads and eat up all processing power.

    Hence it’s quite common to do all the processing in different threads, an event driven style of programming. So you have a thread listening for events such as worker threads completing and deciding which new workers to create and so on. Or maybe a thread listening for new requests (eg. user’s clicking something, or files being created or messages arriving) and deciding whether and when to kick off workers.

    In general modern UIs are almost entirely event driven, most of the code is in event handlers (do this when the user clicks that), you don’t yourself write a main, the UI framework is in control and calls your code.

    I think you’d find it helpful to study a tutorial about event driven programming.

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

Sidebar

Related Questions

I'm having some difficulties with Ajax.BeginForm I have something like this in a view
i have some understanding difficulties. i have some checkboxes in html like this: <input
I have some difficulties with understanding BindingSource's behaviour. Let's look at following example: Creating
I have some difficulties in my project. I got the RGB values from a
I have some difficulties for using Ruby block, passing in a method. As in
I'm have some difficulties here, I am unable to successfully call a method which
I am new to programing and I have some difficulties getting AlertDialog working. I
I have some text lines like that : vt_wildshade2^508^508 vt_ailleurs2^1188^1188 ... vt_high2^13652^13652 Is it
i have some difficulties changing tab bar controllers. Basically I have UITabBarController with 3
I have some difficulties grasping some concepts. Grateful for help. Let's say you have

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.