If I have a synchronous ajax call running, and an asynchronous call is made while that is happening (via setTimeout() ) will the second call stop/interupt/have any impact on the first call?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Javascript is single-threaded. As a result
setTimeoutcalls can only fire while there is nothing else running. It will fire, once the synchronous ajax call completes and the function that made the ajax request yields control by returning.