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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:37:21+00:00 2026-06-01T20:37:21+00:00

If it is current, will it occurs the problem of call stack overflow? because

  • 0

If it is current, will it occurs the problem of call stack overflow?

because it call self infinite recursively

If it will occurs such problem, are there any better implementation?

function waitForMsg(){
    $.ajax({
        type: "GET",
        url: "xxx.php",
        async: true,
        cache: false,
        timeout: 600000,
        success: function(data){
            handleFunction(data);
            waitForMsg();
        },
        error: function(XMLHttpRequest, textStatus, errorThrown){
            XMLHttpRequest.abort();
            waitForMsg();
        }
    });
}
  • 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-01T20:37:23+00:00Added an answer on June 1, 2026 at 8:37 pm

    I suppose it’s a kind of recursion, but not strictly in terms of the current context, because you’re adding anonymous functions onto an object that’s passed into the ajax function, and the ajax invocation returns immediately (it doesn’t do anything to evaluate the functions). When the ajax finally succeeds or fails, whichever function needs to be invoked is in a completely new context, with different stack values and stack location.

    BTW, I’m not sure I understand the XMLHttpRequest.abort(); invocation. By that time, the XMLHttpRequest has already failed, so abort shouldn’t be necessary (I would think!).

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

Sidebar

Related Questions

Is there a statement in AS3 that will return current class and/or scope? I'd
With the MKMapView there's an option called Show users current location which will automatically
Is there a ruby gem that will format dates relative to the current time?
My current solution will suck sometimes EDIT For those who don't understand,see this example:
According to current requirement,user will upload files with large size,which he may like to
Below you will find my current vHost entry that I am using for a
My current thinking: I need a certain module that will let me access the
I need a script that will insert the current date and time in an
I have this following code which will return all the current semesters. How do
as we know, return keyword will RETURN some value and exit current function. Mean,

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.