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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:08:23+00:00 2026-06-01T14:08:23+00:00

When I try to get something from local sqlite or from ajax request I

  • 0

When I try to get something from local sqlite or from ajax request I can’t have some value returned, I need to run a callback.

I have some pretty big function that gets and processes some data but I need to put it in the loop and keep it till it’s finished . I can’t accomplish it like that ’cause function is finished before internal callbacks run. I could make a callback run that function again, but wouldn’t it eat the memory? Or it wouldn’t because parent function is finished and internal variables and objects are destroyed?

Sorry for my english.

  • 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-01T14:08:24+00:00Added an answer on June 1, 2026 at 2:08 pm

    I if understand correctly you have a process that passes a callback to a function that you want to repeat in a loop which makes multiple outstanding callbacks.

    The solution to this is to keep a count of the callbacks and decrement it when each one is called. Once the counter reaches zero do your final processing.

    Be careful to start the counter at one and decrement it once all the callbacks have been passed off to ensure that the counter doesn’t prematurely reach zero.

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

Sidebar

Related Questions

When I try to use curl or file_get_contents to read something like http://example.com/python/json/ from
I get this error when I try to call $func('something') : if(($object instanceof MyObject)
When I try and save something to my list in SharePoint I get the
I try to get my device coordinates using google maps api by http request,
I try to get to a page straight from Bash at http://www.ocwconsortium.org/ . The
I have a problem that I know is something local, related to transaction scope,
How can I sync local and remote folders using rsync from inside a php
I'm trying to do an ajax request to get the contents of http://localhost/ running
I am trying to get a series of ids from a local cube to
I'm trying to get a local variable from a decorator. An example: def needs_privilege(privilege,

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.