I don't understand one thing so I'm going to ask it.
Does the WebAPI calls and resolves our function and push the result to call stack? Or does it just waits for call stack to be clear and then hand over the function to it for normal execution?
Hey! Thanks for asking 😊.
The WebAPI resolves the function, and pushes its callback into the queue. The callbacks in that queue are not called until the call stack is empty, then they're pushed to it in order of arrival.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't understand one thing so I'm going to ask it.
Does the WebAPI calls and resolves our function and push the result to call stack? Or does it just waits for call stack to be clear and then hand over the function to it for normal execution?
Hey! Thanks for asking 😊.
The WebAPI resolves the function, and pushes its callback into the queue. The callbacks in that queue are not called until the call stack is empty, then they're pushed to it in order of arrival.