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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:37:46+00:00 2026-06-10T23:37:46+00:00

I have a screen where I make 2 asynchronous calls to get two different

  • 0

I have a screen where I make 2 asynchronous calls to get two different pieces of data. What I am trying to do is depending on one set of data, to display or not display a section of the other data.

Is that possible to do since I don’t know which asynchronous task will come back first, and therefore, do not know whether the first piece of data will be available to the system when it tries to determine whether to display the second piece of data?

Is there any reasonable workaround?

Thanks!

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

    well, I believe you are looking for the semaphore pattern.

    http://en.wikipedia.org/wiki/Semaphore_(programming)

    the idea is this:

    have a variable maintaining the number of asynch calls, in your case this is 2. Then, when either call finishes decrement this counter and check the value. If the counter is at 0, you know both calls are done. Remember to reset the counter to 2 if necessary.

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

Sidebar

Related Questions

I'm trying to make a java RAT but atm I only have screen displaying.
I have 9 screen coordinates, each representing one of 9 positions. From the top
i have a screen contains just two components 1-textView 2-button the textView starts from
I have a screen with pivot functionality, and I'd very much like just one
I have a screen with two RadioButtonField objects. By default, the first RadioButtonField shows
i have a screen with multiple little widgets (all with different divs around them).
I have a screen with a background image and two buttons at the bottom.
I have a full screen UIScrollView to display my image. An UIActivityIndicatorView is added
I have a home screen with a number of image buttons. Upon tapping one
I have my screen divided into two DIV s. In the left DIV I

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.